1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/bug80184.phpt
Nikita Popov 6ea870f5fb Fix bug #80184
2020-10-05 15:24:51 +02:00

21 lines
428 B
PHP

--TEST--
Bug #80184: Complex expression in while / if statements resolves to false incorrectly
--FILE--
<?php
$callbacks = [
function () { echo "First item!\n"; },
function () { echo "Second item!\n"; },
function () { echo "Third item!\n"; },
function () { echo "Fourth item!\n"; },
];
while ($callback = array_shift($callbacks) and ($callback() || true));
?>
--EXPECT--
First item!
Second item!
Third item!
Fourth item!