mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
ded3d984c6
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
31 lines
536 B
PHP
31 lines
536 B
PHP
--TEST--
|
|
list() with constant keys
|
|
--FILE--
|
|
<?php
|
|
|
|
$arr = [
|
|
1 => "one",
|
|
2 => "two",
|
|
3 => "three"
|
|
];
|
|
|
|
const COMPILE_TIME_RESOLVABLE = 1;
|
|
|
|
define('PROBABLY_NOT_COMPILE_TIME_RESOLVABLE', file_get_contents("data:text/plain,2"));
|
|
|
|
$probablyNotCompileTimeResolvable3 = cos(0) * 3;
|
|
|
|
list(
|
|
COMPILE_TIME_RESOLVABLE => $one,
|
|
PROBABLY_NOT_COMPILE_TIME_RESOLVABLE => $two,
|
|
$probablyNotCompileTimeResolvable3 => $three
|
|
) = $arr;
|
|
|
|
var_dump($one, $two, $three);
|
|
|
|
?>
|
|
--EXPECT--
|
|
string(3) "one"
|
|
string(3) "two"
|
|
string(5) "three"
|