-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Account for the fact that undef must be interpreted as null for the purposes of INC/DEC inference.
- Loading branch information
Showing
3 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
Bug #77058: Type inference in opcache causes side effects | ||
--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-- | ||
Notice: Undefined variable: x in %s on line %d | ||
'2' is expected to be 2 |