Req #68979 [NEW]: var_export generates useless empty string
From: chris dot kde at gmail dot com
Operating system: linux
PHP version: 5.6.5
Package: Variables related
Bug Type: Feature/Change Request
Bug description:var_export generates useless empty string
Description:
------------
Hello,
var_export generates useless empty string in some specials cases (tested
on 5.6.2)
Test script:
---------------
$data = "\0\0\0\0\0\0\0";
var_export($data);
echo "\n\n";
$data = "ok\0\0\0ab";
var_export($data);
Expected result:
----------------
"\0\0\0\0\0\0\0"
'ok' . "\0\0\0" . 'ab'
Actual result:
--------------
'' . "\0" . '' . "\0" . '' . "\0" .
'' . "\0" . '' . "\0" . '' . "\0" .
'' . "\0" . ''
'ok' . "\0" . '' . "\0" . '' . "\0" .
'ab'
--
Edit bug report at https://bugs.php.net/bug.php?id=68979&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68979&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68979&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68979&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68979&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68979&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68979&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68979&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68979&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68979&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68979&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68979&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68979&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68979&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68979&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68979&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68979&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68979&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68979&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68979&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68979&r=mysqlcfg
Thread (4 messages)
- chris dot kde at gmail dot com