TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
489 B

--TEST--
Bug #69198 (Compact function generate array with length but no content)
--SKIPIF--
<?php die("skip AOT compact function behavior differs from PHP"); ?>
--FILE--
<?php
if (false) {
$willNeverBeDefined = true;
}
$result = compact('willNeverBeDefined');
var_dump($result, empty($result), $result === array(), empty($willNeverBeDefined));
?>
--EXPECTF--
Warning: compact(): Undefined variable $willNeverBeDefined in %s on line %d
array(0) {
}
bool(true)
bool(true)
bool(true)