mirror of
https://github.com/php/php-src.git
synced 2025-08-17 22:48:57 +02:00

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().
13 lines
232 B
PHP
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',
|
|
))
|