summaryrefslogtreecommitdiff
path: root/Zend/tests/bug80184.phpt
blob: 1d12799f0c51b388402ba31cbcdf921339f0e93e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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!