On Fri, Feb 9, 2024 at 8:13 AM Michał Marcin Brzuchalski <michal.brzuchal...@gmail.com> wrote: > > czw., 8 lut 2024 o 20:10 Sanford Whiteman <figureone...@gmail.com> > napisał(a): > > > Hi Michał, > > > > Thursday, February 8, 2024, 2:58:52 AM, you wrote: > > ... > > >O3:Foo:5{s4:date;O17:DateTimeImmutable:3{s4:date;s26:2024-02-08 > > > > >08:41:10.009742;s13:timezone_type;i:3;s8:timezone;s16:Europe/Amsterdam}s6:*foo;s11:Foo > > >bar > > > > >baz;s8:Foobar;i:123456789;s3:tbl;a4{i:0;i:123;i:1;b:1;i:2;d:1.1;i:3;s3:baz}s8:*color;E12:Color:Yellow} > > > > > >This is still readable by humans and keep the size/length in all places > > >where needed. > > > > Amazing. To my eyes it's more readable too. > > > > Just wondering, while null is encoded just as N the booleans are encoded > with b:0 or b:1 > I can imagine this could also be just T and F > > > > Here's another one: leading numeral *implies* Integer 'i' (so only > > 'd', 'b' and 's<len>' are necessary). Or maybe that goes too far. > > > I was there in the very first link you can spot it but also believe this > goes too far. > > All above already goes far beyond what you initially asked and I know that. > I just like to share what can find. > > Cheers, > Michał Marcin Brzuchalski
If I recall correctly, there is also a `\0` (null character) hiding in the serialized string as well. It's incredibly annoying when copy/pasting as sometimes it gets stripped out. It might be worth removing as well. Robert Landers Software Engineer Utrecht NL -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php