/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/opcache/tests/bug77058.phpt
24 строки
461 B
George Peter Banyard
[RFC] Path to Saner Increment/Decrement operators (#10358)
17 июл 2023, 17:51
Не верифицирован
17 июл 2023, 17:51
d8696f9
Код
Авторство
О чём код?
--TEST-- Bug #77058: Type inference in opcache causes side effects --EXTENSIONS-- opcache --FILE-- <?php function myfunc(){ $Nr = 0; while(1){ $x--; $x++; if( ++ $Nr >= 2 ) break; } echo "'$Nr' is expected to be 2", PHP_EOL; } myfunc(); ?> --EXPECTF-- Warning: Undefined variable $x in %s on line %d Warning: Decrement on type null has no effect, this will change in the next major version of PHP in %s on line %d '2' is expected to be 2