Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122351 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 336 invoked from network); 9 Feb 2024 07:12:55 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Feb 2024 07:12:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1707462829; bh=yDmMqG8Msf+Ax8+JUYOkxR7qpHnb/8aMXCfsRBuzLnA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=VjBmeS6qL88RXz/zIwd5n3gr4ZT/rE6DRugaE5YMMJqPvJ8qpDe8tZMrEbRS/5Jkb ZLm7A0dyIXDPPDUv4eBL5JbsgiMIhheWC5EW/yW9UklC9ll/c//FO1XQTDfyvToy3l 7wlj3eD0tbHElt6LNTwVqwBRxeaUu7PCgJBhV1+xbkVMCm+FO0VHSVVM4wLzPiFdjr u0BRavmuvlTv9D7+XCztrHHF4dv8bbbKLmRd08G9yf6Ay9sByN97CoiE8vlP76d0bN PIK0CbOSZOfVVwnwxI4WHWIxSPHOsSMompyunz6WLBTyV0L8jqKOr7iSdBir7Q8cJF Tmnk4mg5Kihfw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DFA36180061 for ; Thu, 8 Feb 2024 23:13:44 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 8 Feb 2024 23:13:44 -0800 (PST) Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-dc6d9a8815fso641055276.3 for ; Thu, 08 Feb 2024 23:12:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707462770; x=1708067570; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yDmMqG8Msf+Ax8+JUYOkxR7qpHnb/8aMXCfsRBuzLnA=; b=LC95zsZYZkspdaf8lNyKBS+/dYs1oXpwSuHNnHi3/j3zVVkk+5B50no7z+YsfqBeo2 4oz7SLPyKDf/wYH39JNXYfd6hZAISaeGuR6PkNIxrXgFtd7cnEfxIPyn9wIibfgAReMj viCHE4GFE19peWs4wMZuLUAi+QVApddzLCdEdobID/n3WZqFPmswkU7fJz8uBqQEWaPG +pSlbimEwMjVXjobvpu6OT58tAyv6wVKJX4KypXhLf1NCaLFITUO940CWrIZYjTP/EIg hTt/RaNx8kDgXc84T/CvnmvMWn4TJv7RpL6i3me+0Fl2DrBQ/KlAaJqnxRq8my0zqFQT 6RBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707462770; x=1708067570; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yDmMqG8Msf+Ax8+JUYOkxR7qpHnb/8aMXCfsRBuzLnA=; b=ouqFTSaWzdzFzQujm0KtRDf9qL6mn/n10VUO1D4p9p5rlBFXrJmE5Z33GtGhjQuQN5 bX+nMT61iuhYihijWKkdPrx9NdNcJUP6qLGUnAwH/NgVHhP8zwVDedBIhZmRDgEM4Si4 PNSJLdfjS4ClGJ+5I7Hxfn4m0H1kdrYSBnhB0gzEsttnho8wVmMX4tanF7rJ9LI+Hp+v DMUhhRC3jwt4rCVeyrfhs8x9JzNBL/q81Wefb55lEY9MUWkv9ptIJEJ75aOTKYHO2r7/ Rog3ZUagv1BdRIDWADZGC606egs1jUSP9pXwjtTBZtfxJeevgum/f8/oCjiAhV4QLZ7G KNAw== X-Gm-Message-State: AOJu0YxSK1bH6Zb0dk5bMoPbmDr/ug7rZYyc2ijfFoSTSb1kc4bWt9Qj 7V1Cdm1H+hwbSwWHhVpoDP08/EWzN4p3yatcxJ6vonQs+YK1lrqT9rr1YqHLmj62EgzKBjShTj9 ijqX5PW8ChXB4hHPmqfU6Shwfpqk= X-Google-Smtp-Source: AGHT+IE1WnxNzacvVQ1c6E1WdlAS8YCIQYtxBvOE3NqqI9T3w9qpYsfwPvwL75aXeu4jhck6JMhBUnSzsfYtU8b2kw8= X-Received: by 2002:a25:bcc:0:b0:dc7:483c:7e64 with SMTP id 195-20020a250bcc000000b00dc7483c7e64mr586291ybl.54.1707462769950; Thu, 08 Feb 2024 23:12:49 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 9 Feb 2024 08:12:38 +0100 Message-ID: To: Sanford Whiteman Cc: PHP Internals Content-Type: multipart/alternative; boundary="000000000000decd0d0610eda79d" Subject: Re: [PHP-DEV] Why are serialized strings wrapped in double quotes? (s::"") From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?=) --000000000000decd0d0610eda79d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable czw., 8 lut 2024 o 20:10 Sanford Whiteman napisa=C5=82(a): > Hi Micha=C5=82, > > 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}s= 6:*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:b= az}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' 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=C5=82 Marcin Brzuchalski --000000000000decd0d0610eda79d--