mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
21 lines
406 B
PHP
21 lines
406 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--
|
|
Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
|
|
|
|
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
|
int(2)
|