php-src/ext/standard/tests/array/var_export.phpt
Andrea Faulds a0502b89a6 Convert numeric keys in object/array casts
RFC: https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts

This converts key types as appropriate in object to array and array to object
casts, as well as in get_object_vars().
2016-11-14 18:20:45 +00:00

13 lines
232 B
PHP

--TEST--
var_export() and objects with numeric indexes properties
--FILE--
<?php
$a = (object) array (1, 3, "foo" => "bar");
var_export($a);
?>
--EXPECT--
stdClass::__set_state(array(
'0' => 1,
'1' => 3,
'foo' => 'bar',
))