mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
d8696f9216
* Add behavioural tests for incdec operators * Add support to ++/-- for objects castable to _IS_NUMBER * Add str_increment() function * Add str_decrement() function RFC: https://wiki.php.net/rfc/saner-inc-dec-operators Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com> Co-authored-by: Arnaud Le Blanc <arnaud.lb@gmail.com>
18 lines
429 B
PHP
18 lines
429 B
PHP
--TEST--
|
|
Unreachable phi cycle
|
|
--FILE--
|
|
<?php
|
|
// The inner loop is dead, but SCCP reachability analysis doesn't realize this,
|
|
// as this is determined based on type information.
|
|
function test() {
|
|
for (; $i--;) {
|
|
for(; x;);
|
|
}
|
|
}
|
|
test();
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Undefined variable $i 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
|