Software developer. Creator of PHP centric package like league/csv, league/uri and bakame/http-structured-fields. Sponsor me at github.com/sponsors/nyamsprod
Public Key
npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl Profile Code
nprofile1qqswnkypqgnptjvrg679umc9t43825qwtm485srqjkmwrtjqpjy75yqpz3mhxue69uhhyetvv9ujuerpd46hxtnfduqs6amnwvaz7tmwdaejumr0dsgtz63l
Show more details
Published at
2026-08-20T10:32:47Z Event JSON
{
"id": "0581aa75a24dd7307e934fe3ddf3e0a2a9cf175d4331365d6d04dfe93634c59b" ,
"pubkey": "e9d881022615c98346bc5e6f055d6275500e5eea7a406095b6e1ae400c89ea10" ,
"created_at": 1787221967 ,
"kind": 0 ,
"tags": [
[
"proxy",
"https://phpc.social/users/nyamsprod",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.ditto.pub"
]
],
"content": "{\"name\":\"ignace nyamagana butera\",\"about\":\"Software developer. Creator of PHP centric package like league/csv, league/uri and bakame/http-structured-fields. Sponsor me at github.com/sponsors/nyamsprod\",\"picture\":\"https://media.phpc.social/accounts/avatars/000/065/807/original/127c7f2f1e85fe61.jpg\",\"banner\":\"https://media.phpc.social/accounts/headers/000/065/807/original/dd0691332b92f5cd.png\",\"nip05\":\"[email protected] \",\"fields\":[[\"Website\",\"https://nyamsprod.com\"],[\"Github\",\"https://github.com/nyamsprod\"]]}" ,
"sig": "fb3ab18184b826480f117b7449d2f4e9ae7dc474fbad73fb4473e0aa34cdc6b7383b4a138892cccc3536e51101a346518e292de013e2ab0b045858bb2962d567"
}
Last Notes npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera Everytime I think I found a use case for property hooks I endup making the class readonly with a public property calculated in the constructor. The facts that both concept do not get along should be telling at this point #php #thoughts npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…qp6c food for your thoughts I rewrote the foot size converter app into a single page app. and added l9n to it was fun to code. And you can toggle between Adult Size and Children Size. However I am not sure if the german and all the other languages are correctly translated https://media.phpc.social/media_attachments/files/117/179/046/512/922/966/original/c7aa0acbf21f3abf.png https://media.phpc.social/media_attachments/files/117/179/046/509/342/958/original/478f814b09a0004a.png npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…qp6c went shopping for my kids shoes and T-shirt I went blank after 3 shops and several sizes later npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…qp6c And version 1.0 stable is released I do not think I will work on it again but any PR to improve it are welcomed 🥳 https://github.com/bakame-php/shoes-size-converter Oh and there's a catch ... the whole thing only works for Adults ... because there's another specification and algorithm for children shoes because why make it simpler when you can complexify 🤷 npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…klmm in PHP, the CSV api can generate array(null) ... I know you love that 😂 npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…qp6c look what you made me do ... bad man 😂 https://github.com/bakame-php/shoes-size-converter npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…qp6c @nprofile…psdt And there I was thinking it could not be worse ... but it can https://en.wikipedia.org/wiki/Shoe_size#Difficulties I'll go back fighting dates and metric systems those seems to be easier to resolve 😂 🤷🏽 npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…psdt @nprofile…qp6c TL;DR we should adopt the Japan way or the ISO and move on to other important matters. Where's the EU standardizing body when you need one npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…qp6c got the email too for a plugin I wrote probably 15 years ago. I am a bad programmer so I did not even bother to check. Not sure if I still have access to the codebase. But I still find this reminder to be a +1 . Can it be perfected of course but for once Wordpress does something other PHP ecosystem are unable to do IMHO so kuods to them npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…qp6c indeed there's none you might try using/abusing the A-TAG maybe but I am not sure/confident about the result. npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…qp6c you forgot that PHP has now 2 new URI parsers and they will make you complain even more 😂 https://3v4l.org/MfFIK#v npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera #PHP I've notice that I barely use __toString nowadays. I came to realise that there is no one true single string representation for anything. So __toString is a bad micro/early optimisation that should be avoided. It is conceptually a bad idea. I prefer toWhateverRepresentationString. it might be a bit longer to type but it won't bite you in six months. PS: I have the same thoughts for toArray. npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…pfuj back in the days I remember PHP and simple HTML being used to do some comics cover generator ... but I suppose this is now a bit risky with all the legal issue around intellectual properties. But it should be easy and fun do to a similar engine for something else I guess npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera https://friendlybit.com/python/writing-justhtml-with-coding-agents/ I wonder if this is the future of coding 🤔 #AI #vibe_coding npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera Periodic reminder Stop using boolean as options flags in #PHP use Enum (Backed or Not that's not the point) instead. Boolean flags are hard to read and to remember and they often lead to tricky bugs or at best a required trip to the API documentation if it exists (defaulting to scanning the codebase for the method definition), Enum are explicit and readable and offer granularity instead of a simple yes/no answer npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…240e not a plugin ... just PHPStorm bug npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…240e PHPStorm is telling me otherwise ... I should have tested on 3v4l good advice .. https://media.phpc.social/media_attachments/files/114/773/981/870/124/391/original/fa6603af13941238.png npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…240e I may have miss it during Enum discussion but why can't in Backed Enum we do what is allowed for constants aka something along this line enum MemoryUnit: int { case Byte = 1; case Kilobyte = 1_024; case Megabyte = 1_024 * 1_024; case Gigabyte = 1_024 * 1_024 * 1_024; case Terabyte = 1_024 * 1_024 * 1_024 * 1_024; } #PHP #Enum #questionoftheday npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera My older brother once told me if you don't congratulate yourself no one will. So in summary the total download of all my #PHP packages has now surpassed the 500 millions lead by league/uri and league/csv 🎉🎉🎉🎉 and the best part of it is that I never actively made any marketing of any of those packages which hopefully speaks volume about their usefulness npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera PHP may be the first language to correctly support RFC3986 and WHATWG URL at the same time if https://wiki.php.net/rfc/url_parsing_api passes. Any URI user should read this RFC. It is a big step in the right direction. Good job by @nprofile…rydx . If the RFC is too long I created a polyfill for testing which works on PHP8.1+ https://github.com/bakame-php/aide-uri It will get tagged as stable once the RFC has passed. #PHP #URI #WHATWG #URL npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…240e you are starting to sound like a european ... beware next you are going to ask for Universal health care npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…dhpg how nice and it uses http structured fields to define the header even nicer 😍 I knew my small lib would be useful 😂 npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…240e Never say that again no french speaking person would say that ... je suis pas native just sound too awkward or could have some bad connotation like people may be thinking that you are a native american... @nprofile…wswd if you are into Symfony most of the core dev team are french speaking dev so if you know some of them you could parler français avec eux sans aucun souci 👿 . I speak french too! so 🤷 npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…utw6 @nprofile…des0 what about https://3v4l.org/F9tGl vs https://3v4l.org/hZeCm or I am missing something 🤔 npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…240e Never a list of values in an array is the perfect fit ... kidding I know deep down inside you love arrays but you are too afraid to say so 🤣 npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…240e is it an oversight that get_class_vars is unable to see the property hooks 🤔 I know I should be using Reflection but get_object_vars is able to see them. For reference https://3v4l.org/qdcah #propertyhooks #detection #php npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…240e hence why I need someone with more experience to help me get it right but I believe most of the proposal seems reasonable to me npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…240e I was told it was better for small function to first have an implementation. https://gist.github.com/nyamsprod/8a5cf21c136952a46ec8836f29738c82 for the text if you are interested npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera I have an RFC in preparation for a year now to add a function to PHP but because of lack of time and my small knowledge of internals I have not yet finished it. Most is done, the text, the stub and testing files, a polyfill for older PHP version and I have a partial implementation. If someone with better knowledge of PHP could step in and help me finish the implementation that would be great #PHP #RFC #help just ping me and we can discuss it npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…dhpg indeed you are correct but that was a quick example the real method accepts the result of a select statement be it PDOStatement or mysql_result or SQLite3 but the signature then becomes larger to include in a post npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera I always forget that PHP has union type so instead of creating a single named constructor like Object::new(string|objectA|objectB) I add fromString, fromObjectA, fromObjectB like in the PHP7/5 old days which only add meaningless boilerplate 🤷 #PHP #namedconstructor npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…240e hence why I now always block either read or write accesss on ArrayAccess implementing class and why league/CSV has a reader and a writer but not a magic class that does both npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera Today the #LeagueURI package has joined the 100M+ downloads club! This shows that many of you have found value and trust in my work. I’d be truly grateful if you considered showing your support by becoming a sponsor to keep the adventure going! Thanks in advance! https://github.com/sponsors/nyamsprod #PHP #opensource npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera #TIL: I finally found a reason to use MySQLi instead of PDO ...you can rewind a MySQLiResult ... but you can not rewind a PDOStatement #PHP #RBMS npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…240e @nprofile…qc2h **IF USE PROPERLY** that the main take away point because if not you've just release the wolf in the poultry yard 😈 npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…dhpg @nprofile…n0j0 @nprofile…240e I like @nprofile…dhpg explanation I did use a similar justification for going full final with https://bakame-php.github.io/http-structured-fields/2.0/extensions/ Final rules when used wisely npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera When a person tells you that #PHP is old not like #javascript just tell them that they were both released in 1995 then slowly but with confidence drop out of the conversation to preserve your lifespan for some productive activities like playing with your kids or watching a movie npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…240e So in summary you hate arrays, null value and fake snow on websites. Next you are going to also dislike stdClass and ... pineapple on pizza ... 😈 npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera Did you know you could do the following with #leagueCSV ? Querying a #CSV document in #php has never been so much easier using a #querybuilder https://media.phpc.social/media_attachments/files/113/652/319/764/785/499/original/7ea970adf35ac05b.png npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera The latest #Laravel release introduces an Laravel URI object which uses #LeagueURI packages for URI and query parsing. What many have miss is that by doing so Laravel has become the first major PHP framework to work with URL without depending on parse_url and parse_str. So in Laravel if you get your query parameters from the new URI class its keys will never get mangled and the URI will be parsed according to RFC3986 and not against a non conforming RFC algorithm. npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera I finally hit the release button on my http structured fields package for #php https://bakame-php.github.io/http-structured-fields/ The new version comes with a validation feature, a brand new documentation website and a logo 😍 If you are using/consuming HTTP headers or trailers or trying to create one this package is for you. Special thanks to @nprofile…4edh and https://hachyderm.io/@gapple without whom this package would not exist. npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…dhpg as another #PHP library maintainer I see it as I see the debate of removing the final keyword in your package classes. It's like shooting yourself in the foot and pretending that it does not hurt. npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…mmpy @nprofile…uafq @nprofile…ttg9 JavaScript would keep the first one or all of them depending on the method you use 😂 . npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…uafq @nprofile…ttg9 Do you need more evidences 😜 https://media.phpc.social/media_attachments/files/113/611/903/335/370/982/original/14dab7adb81a4fc5.png npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera Periodic reminder: The way PHP parses URL query string is specific to PHP. If you want interoperability you should stay away from parse_str which was built to populate the _GET superglobal. #php #URL #querystring npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…240e I love null and I love array leave me alone with your attitude toward good ol PHP 😈 npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera Question is it worth if to release a new major version of a package that still target #PHP8.1 🤔 since PHP8.2 will soon enter security fix only ? npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…mmpy agreed I was talking from the POV of a package maintainer. from the POV of a framework maintainer I would guess that the answer would also be different than mine. IMHO frameworks should just support a max of 3 versions more is a hell of a work and I respect any framework maintainer for that regardless of the framework. it takes a lot of background task to correctly support PHP at a framework level. I think most of us users do not even think about it npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera #unpopularopinion I know #PHP8.4 is out and I highly recommend new projects to start on it right away if possible BUT I don't feel compelled to drop PHP8.1 yet. None of my current or new packages would benefit for the new shiny stuff so much that dropping 8.1 would make sense. Am I wrong or am I missing something ? npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…dhpg @nprofile…pd8t @nprofile…l5uf its been there for almost 4 years and all new headers from Chrome to what not uses it already. I even created a PHP package for it . Working on v2 at the moment https://github.com/bakame-php/http-structured-fields npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…dhpg @nprofile…pd8t @nprofile…l5uf I think the new and better response is https://www.rfc-editor.org/rfc/rfc9651.html but for some reasons this as yet to gain traction in PHP 🤷 npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera Writing documentation is hard ... writing good documentation is harder I've been stuck in writing hell for the v2 of my #PHP package for the past 7 days. npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @nprofile…uafq I let some times between the agreement being signed and it coming actually into effect so I am buying times to io owners on their behalf I guess 🤔 npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera Seems the .io owners got a bit of a relief from ICANN at least until 2031 unless St Mauritius and the UK agreement says otherwise. https://www.icann.org/en/blogs/details/the-chagos-archipelago-and-the-io-domain-14-11-2024-en npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera #php question of the day ? Is this considered bad code, unexpected code or nice I haven't thought about it type of code ? https://gist.github.com/nyamsprod/c8072b382074a474a22bc94e4a5dd3ab npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera @npub1e0g…y6fq RFC9651 is out and https://github.com/bakame-php/http-structured-fields already supports it !!! Work with modern headers in your #php applications already today npub1a8vgzq3xzhycx34utehs2htzw4gquhh20fqxp9dkuxhyqryfaggqus0vwl ignace nyamagana butera Coming soon in the next minor release of League\Csv 😍 still ironing the feature that you can already test on the master branch. give it a try #csv #php https://csv.thephpleague.com/9.0/reader/statement/#where-clauses https://media.phpc.social/media_attachments/files/112/381/609/595/918/713/original/f70430bd9f0f71b4.png