mirror of
https://github.com/php/php-src.git
synced 2024-12-13 20:05:26 +08:00
ded3d984c6
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
36 lines
477 B
PHP
36 lines
477 B
PHP
--TEST--
|
|
Bug #66015 (wrong array indexing in class's static property)
|
|
--FILE--
|
|
<?php
|
|
class Test
|
|
{
|
|
const FIRST = 1;
|
|
const SECOND = 2;
|
|
const THIRD = 3;
|
|
|
|
protected static $array = [
|
|
self::FIRST => 'first',
|
|
'second',
|
|
'third',
|
|
4,
|
|
];
|
|
|
|
public function __construct()
|
|
{
|
|
var_export(self::$array);
|
|
}
|
|
}
|
|
|
|
$test = new Test();
|
|
?>
|
|
|
|
===DONE===
|
|
--EXPECT--
|
|
array (
|
|
1 => 'first',
|
|
2 => 'second',
|
|
3 => 'third',
|
|
4 => 4,
|
|
)
|
|
===DONE===
|