Post AWckfbVh8QFPQrQ4f2 by cabbey@phpc.social
 (DIR) More posts by cabbey@phpc.social
 (DIR) Post #AWcjty6loSgncQ2yKe by afilina@phpc.social
       2023-06-12T17:53:12Z
       
       0 likes, 0 repeats
       
       When you try your best, but legacy PHP date functions still blow up in your face in unexpected ways.I sometimes laugh like a madwoman in my office.https://3v4l.org/NuDKd
       
 (DIR) Post #AWcjtz9ztwrgsiZ408 by Skoop@phpc.social
       2023-06-12T17:56:14Z
       
       0 likes, 0 repeats
       
       @afilina wait, what?!
       
 (DIR) Post #AWcjtznhWKckrr8lt2 by heiglandreas@phpc.social
       2023-06-12T18:06:30Z
       
       0 likes, 0 repeats
       
       @Skoop @afilina Yeah. Makes sense... ๐Ÿ™ˆ
       
 (DIR) Post #AWcju04iV4Edid6MPQ by afilina@phpc.social
       2023-06-12T17:54:32Z
       
       0 likes, 0 repeats
       
       Now to figure out how to create an adapter that can distinguish between "argument not provided" and "argument provided explicitly as null". Even func_get_args and isset aren't helping. I must be missing something simple.
       
 (DIR) Post #AWcju0im68HHirqLqa by heiglandreas@phpc.social
       2023-06-12T18:10:02Z
       
       0 likes, 0 repeats
       
       @Skoop @afilina Because... https://3v4l.org/iHR3S
       
 (DIR) Post #AWcju1XT3epMG5YprU by ramsey@phpc.social
       2023-06-12T18:16:08Z
       
       0 likes, 0 repeats
       
       @heiglandreas @Skoop @afilina That makes it even more obvious this is a bug in PHP 8. ๐Ÿ˜ณ
       
 (DIR) Post #AWcju2KO7lxWhoRu76 by heiglandreas@phpc.social
       2023-06-12T18:33:06Z
       
       0 likes, 0 repeats
       
       @ramsey @Skoop @afilina Passing in the default value explicitly triggers default behaviour... how can that be a bug?I'd rather say the functionality before was a bug that got fixed...But I might not see the whole picture....
       
 (DIR) Post #AWcju2xjlTR0fqrKRk by ramsey@phpc.social
       2023-06-12T18:35:33Z
       
       0 likes, 0 repeats
       
       @heiglandreas @Skoop @afilina Iโ€™m talking about in terms of the type error. PHP 8 added stricter type errors to internal functions, but this one doesnโ€™t throw in PHP 8, even when running in strict types mode. That seems like a bug to me.
       
 (DIR) Post #AWcju3dvEdB8mgb1CS by ramsey@phpc.social
       2023-06-12T18:36:33Z
       
       0 likes, 0 repeats
       
       @heiglandreas @Skoop @afilina Never mind. I missed that `null` is the default value. Carry on.
       
 (DIR) Post #AWcju3ypyruPpYNing by heiglandreas@phpc.social
       2023-06-12T18:34:48Z
       
       0 likes, 0 repeats
       
       @ramsey @Skoop @afilina That is even explicitly mentioned in the docs... https://www.php.net/manual/en/function.date.php
       
 (DIR) Post #AWcju4E54C6OapVtYm by wogan@mastodon.africa
       2023-06-12T18:43:18Z
       
       0 likes, 0 repeats
       
       @ramsey @heiglandreas @Skoop @afilina I know I'm just a passerby in this conversation, but I find this fascinating: Is it true that every successive release of PHP is getting fractionally slower, or is this a too-small-to-actually-matter/misleading-benchmark stat?
       
 (DIR) Post #AWckfbVh8QFPQrQ4f2 by cabbey@phpc.social
       2023-06-12T18:51:52Z
       
       0 likes, 0 repeats
       
       @wogan @ramsey @heiglandreas @Skoop @afilina that is way too small of a sample to do any kind of performance evaluation against on a shared system like 3v4l.
       
 (DIR) Post #AWcknDA3Y1OQEQvSSm by wogan@mastodon.africa
       2023-06-12T18:53:20Z
       
       0 likes, 0 repeats
       
       @cabbey Yeah I figured as much, it's just rare (for me, anyway) to see such a neat linear correlation between version numbers and runtime - figured it was ultimately meaningless, though it does make an aesthetically pleasing chart!@ramsey @heiglandreas @Skoop @afilina
       
 (DIR) Post #AWcmKOHtIivmFYyXRI by ramsey@phpc.social
       2023-06-12T19:10:26Z
       
       0 likes, 0 repeats
       
       @wogan @cabbey @heiglandreas @Skoop @afilina Donโ€™t use 3v4l for performance testing. ๐Ÿ˜
       
 (DIR) Post #AWcqdSk5MVxRNvVrDE by derickr@phpc.social
       2023-06-12T19:58:42Z
       
       0 likes, 0 repeats
       
       @wogan @cabbey @ramsey @heiglandreas @Skoop @afilina It's probably related to binary size in 3v4l. The runtime usually becomes faster with each release.
       
 (DIR) Post #AWcwDiozYbnBRuuuMi by afilina@phpc.social
       2023-06-12T21:01:16Z
       
       0 likes, 0 repeats
       
       @wogan @ramsey @heiglandreas @Skoop Official benchmarks show the contrary. Every single client I upgraded got a significant performance boost, FWIW. I had a client who had a substantial traffic increase once a year, with servers becoming very unstable. Everything was always smooth since the upgrade.
       
 (DIR) Post #AWd1cBvNVJSmQoOJpw by wogan@mastodon.africa
       2023-06-12T22:01:49Z
       
       0 likes, 0 repeats
       
       @afilina @ramsey @heiglandreas @Skoop Yeah I doubt any meaningful benchmark would show a simple linear trend like that, which is what made me curious :) I have no doubt that actual PHP performance has gotten better over time. Only been working with it since about 2007 ๐Ÿ™ƒ