Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122332 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 84506 invoked from network); 7 Feb 2024 16:35:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Feb 2024 16:35:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1707323763; bh=FSBwDiTkuVPa2pVmTzzhGw2Lkggku7SrQ/qKW/KG4so=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=GT+XAlru9LerMGNRiGkUp0/wk8TZ1pOWEh+A8FNblaGOJHlOszEhLlJv4kYsy5hQu TVTuweniW0Tkbs/WqnzqBHFgpnimJZJAc2puuMlfgRKVgKfz2oiUE80hyrAM7qZnMu bGViP2NFqM0o8Dyrf0i2I3fA1nGlfyTdrDbCDb5MijgxB7gQkt7QDp4lhIelnU+FJ9 trLzhOU2qw80wRBauiC1MCJiSWMuvIWmZbK752gQIL8kebY4yzZScoIyivDqn9Wtn4 ak/c12XM+7qWxvyWUAeAT6Wq6c9a/AihWQnZPRFc5U0gn5xICZNucG+Hl8iZExiqjm AN7o2Y7l6ayXw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 079A118005B for ; Wed, 7 Feb 2024 08:36:02 -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, 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-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 ; Wed, 7 Feb 2024 08:36:01 -0800 (PST) Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-33b53d7c093so82579f8f.1 for ; Wed, 07 Feb 2024 08:35:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707323707; x=1707928507; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9qj2sJp9wKHGGVP8/IcCmyv0+j6brO7w/Co825vtKx8=; b=P9NG7SgfnJ2O+giqWgEhsS9Lr4Q2Y4dRzmce1n6OtSeBMioHzBdNYm04t2u1lcP2nE LshgXaGL5r88XrovaKgKOcdAYOWLN0v4E97er01FC8DLKfxZzP0XE6FChAGeFJDEkTQy uvUXtNNi52llMn2bUy6iqvbTLZsDWoYXdNlXiKYVyUcyZh5q4o7Qeq2N5hwDDVER4ZtI Xq9yjKQOQ9PiMc1j0jIAGBE1zeKo4vuzwVzeNCARUUwZzWiv7yvv+YjmjyqyusBnDWPf LOojubaNy+8akGvYZ8FJGBaWZF+VUV7xFUela9yDBkhBz9wVUltn5FTyWzwg0KkjRCXH /sLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323707; x=1707928507; h=content-transfer-encoding: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=9qj2sJp9wKHGGVP8/IcCmyv0+j6brO7w/Co825vtKx8=; b=JGZWJrB2gpdEbxfQuzcwHk+hrj2QPzjyKb9LTpwjRJtegjH1WbpE3Kzx4rOTUPefgK oeLOKiXuXR1BoC9wyQCqK0zT21IujNrNei/qIG5Nt8w8IfmA5Q2OyzOwM31wHII+0eaj uAq/nutjLBL8d4+MJ4aCzUKrCt2kSfzkteMkw656Y/OaYQv9rBQ2IyGWC5iQ+PZ0kKis UhABbTH9JUlZEFHM1q9uwTnR1THsBH2ZVeC4Oh61Yp9Vw4LKcJPAefmC01vNHg+5mK2+ VCv94XvXrk2wYfoRbusmIPw8eICrsVasaE11OPsPKgYc0cvsWqEU6m5xnAlvX5YqFEaN oRCA== X-Gm-Message-State: AOJu0Yyab7KqPLs2lLCFG0BTS6eV5IX6nEb+nLy4BpLlNmPwB5Lj1IF4 gyxfXjELMN4O9YNEq5K+zXa81KPfz+2xFpcVxEn3UHCp1d0BpH8H5R9LYbypmj8ycqi0rVZG72m yk7cX0KT1AFk9/PUFknotBhBMPLo= X-Google-Smtp-Source: AGHT+IHDBuUCSNh7vUAiHlqI03I3mGz4P3V6pk4ykrlK0fFb4L4fnbRzhZq6IB26biypG+0vzMvaFepbHQltPijrmEs= X-Received: by 2002:adf:f70a:0:b0:33b:37fd:eafe with SMTP id r10-20020adff70a000000b0033b37fdeafemr4110936wrp.69.1707323707076; Wed, 07 Feb 2024 08:35:07 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 7 Feb 2024 11:34:55 -0500 Message-ID: To: Ilija Tovilo Cc: PHP Internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Why are serialized strings wrapped in double quotes? (s::"") From: figureonecpr@gmail.com (Sanford Whiteman) > I don't have the historical context, but I'm assuming that's it. PHPs > serialization format is not efficient, and I don't think that was ever > the primary focus. Thanks Ilija. That'll have to suffice unless someone remembers a specific decision (searching all the old Internals posts nothing came up). Most of m= y readers are pretty junior but I hate to say something that conflicts with their intuition. =E2=80=94 S. On Wed, Feb 7, 2024 at 7:28=E2=80=AFAM Ilija Tovilo wrote: > > Hi Sandy > > On Tue, Feb 6, 2024 at 9:19=E2=80=AFPM Sanford Whiteman wrote: > > > > I'd like a little background on something we've long accepted: why > > does the serialization format need double quotes around a string, even > > though the byte length is explicit? > > > > Example: > > > > s:5:"hello"; > > > > All else being equal I would think we could have just > > > > s:5:hello; > > > > Was this just to make strings look more 'stringy', even though the > > format isn't meant to be human-readable? > > I don't have the historical context, but I'm assuming that's it. PHPs > serialization format is not efficient, and I don't think that was ever > the primary focus. If you need something more efficient, you can try > https://github.com/igbinary/igbinary which is aimed to be a drop-in > replacement. > > Ilija > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php >