#30411 [Opn->WFx]: Unecessary quotes in serialized strings

From: Date: Tue, 12 Oct 2004 14:28:08 +0000
Subject: #30411 [Opn->WFx]: Unecessary quotes in serialized strings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-67478@lists.php.net to get a copy of this message
ID: 30411 Updated by: derick@php.net Reported By: kell_pt at users dot sf dot net -Status: Open +Status: Wont fix -Bug Type: Zend Engine 2 problem +Bug Type: Feature/Change Request Operating System: any PHP Version: 5.0.2 New Comment: This is not a bug, but just how it works. Making this a "Wont fix" feature request as we have no incentive of changing this. Previous Comments: ------------------------------------------------------------------------ [2004-10-12 15:57:38] kell_pt at users dot sf dot net Description: ------------ This is not so much a bug report, but more of a remark - I just didn't know where to put it. When serializing strings PHP includes double quotes. Seeing as it also stores the size, aren't quotes just a waste of space? I can't see them serving any purpose - any parser will merely read in the size and then read that many characters. Reproduce code: --------------- $str = serialize( array( "company" => "101_e", "country => "101_3", ) ); echo( $str ); Expected result: ---------------- a:2:{s:7:company;s:5:101_e;s:7:country;s:5:101_3;} Actual result: -------------- a:2:{s:7:"company";s:5:"101_e";s:7:"country";s:5:"101_3";} ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30411&edit=1

« previous php.bugs (#67478) next »