live_range_phi_leak.phpt 336 B

12345678910111213141516171819
  1. --TEST--
  2. Missing live range if part of phi
  3. --FILE--
  4. <?php
  5. function doThrow() {
  6. throw new Exception("Test");
  7. }
  8. function test($k) {
  9. // The 0 gives the QM_ASSIGN a non-refcounted type.
  10. $res[$k ? $k : 0] = doThrow();
  11. }
  12. try {
  13. test(new stdClass);
  14. } catch (Exception $e) {
  15. echo $e->getMessage(), "\n";
  16. }
  17. ?>
  18. --EXPECT--
  19. Test