anonymous_func_003.phpt 315 B

12345678910111213141516
  1. --TEST--
  2. Using throw $var with anonymous function return
  3. --FILE--
  4. <?php
  5. try {
  6. $a = create_function('', 'return new Exception("test");');
  7. throw $a();
  8. } catch (Exception $e) {
  9. var_dump($e->getMessage() == 'test');
  10. }
  11. ?>
  12. --EXPECTF--
  13. Deprecated: Function create_function() is deprecated in %s on line %d
  14. bool(true)