mirror of
https://github.com/php/php-src.git
synced 2026-04-17 13:01:02 +02:00
I don't like this... we may want to detect "obviously not string" operands by checking for the result of a comparison instruction.
20 lines
312 B
PHP
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)
|