1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/ext/standard/tests/array/bug69198.phpt
2018-06-19 12:50:15 +02:00

18 lines
405 B
PHP

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