bug48408.phpt 476 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Bug #48408 (crash when exception is thrown while passing function arguments)
  3. --FILE--
  4. <?php
  5. class B{
  6. public function process($x){
  7. return $x;
  8. }
  9. }
  10. class C{
  11. public function generate($x){
  12. throw new Exception;
  13. }
  14. }
  15. $b = new B;
  16. $c = new C;
  17. try{
  18. $b->process($c->generate(0));
  19. }
  20. catch(Exception $e){
  21. $c->generate(0);
  22. }
  23. ?>
  24. --EXPECTF--
  25. Fatal error: Uncaught Exception in %s
  26. Stack trace:
  27. #0 %s(%d): C->generate(0)
  28. #1 {main}
  29. thrown in %s