1--TEST-- 2list() with constant keys 3--FILE-- 4<?php 5 6$arr = [ 7 1 => "one", 8 2 => "two", 9 3 => "three" 10]; 11 12const COMPILE_TIME_RESOLVABLE = 1; 13 14define('PROBABLY_NOT_COMPILE_TIME_RESOLVABLE', file_get_contents("data:text/plain,2")); 15 16$probablyNotCompileTimeResolvable3 = cos(0) * 3; 17 18list( 19 COMPILE_TIME_RESOLVABLE => $one, 20 PROBABLY_NOT_COMPILE_TIME_RESOLVABLE => $two, 21 $probablyNotCompileTimeResolvable3 => $three 22) = $arr; 23 24var_dump($one, $two, $three); 25 26?> 27--EXPECTF-- 28string(3) "one" 29string(3) "two" 30string(5) "three" 31