|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-12-08 14:10 UTC] krakjoe@php.net
-Status: Open
+Status: Not a bug
[2015-12-08 14:10 UTC] krakjoe@php.net
[2016-02-10 13:48 UTC] shakaran at gmail dot com
[2019-05-21 20:33 UTC] vlad dot rmn at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 11:00:01 2025 UTC |
Description: ------------ Calling var_export with an array parameter generates PHP code that uses old-style long array syntax instead of PHP 5.4-style short array syntax. There are also some spacing issues that mean that the generated code is not PSR-2 compliant (space after 'array' and 2-space indenting), and I don't see any good reason for that not to be the case. It appears that this behaviour occurs in all versions since PHP 5.4, including 7. Test script: --------------- var_export(['a' => 0]); Expected result: ---------------- [ 'a' => 0, ] Actual result: -------------- array ( 'a' => 0, )