From:             kell_pt at users dot sf dot net
Operating system: any
PHP version:      5.0.2
PHP Bug Type:     Zend Engine 2 problem
Bug description:  Unecessary quotes in serialized strings

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 bug report at http://bugs.php.net/?id=30411&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30411&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30411&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30411&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30411&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30411&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30411&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30411&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30411&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30411&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30411&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30411&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30411&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30411&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30411&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30411&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30411&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30411&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30411&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30411&r=mysqlcfg

Reply via email to