1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Files
archived-php-src/Zend/tests/assert/indirect_var_access_misoptimization.phpt
Nikita Popov b65b15c6f4 Mark assert() as INDIRECT_VAR_ACCESS
I don't like this... we may want to detect "obviously not string"
operands by checking for the result of a comparison instruction.
2016-05-17 16:13:17 +02:00

20 lines
312 B
PHP

--TEST--
Misoptimization when variable is modified by assert()
--INI--
zend.assertions=1
--FILE--
<?php
function test() {
$i = 0;
assert('$i = new stdClass');
$i += 1;
var_dump($i);
}
test();
?>
--EXPECTF--
Notice: Object of class stdClass could not be converted to int in %s on line %d
int(2)