-
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.
Handle SWITCH_STRING with optimized away FREE
This can happen in degenerate cases where we know that the SWITCH_STRING argument is not refcounted. We should be treating it in the same way as SWITCH_LONG here.
- Loading branch information
Showing
2 changed files
with
17 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
A SWITCH_STRING operand FREE may be optimized away | ||
--FILE-- | ||
<?php | ||
function test($a) { | ||
switch (!$a) { | ||
case '': | ||
r>l; | ||
default: | ||
} | ||
} | ||
?> | ||
===DONE=== | ||
--EXPECT-- | ||
===DONE=== |