bug24926.phpt 478 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Bug #24926 (lambda function (create_function()) cannot be stored in a class property)
  3. --FILE--
  4. <?php
  5. error_reporting (E_ALL);
  6. class foo {
  7. public $functions = array();
  8. function foo()
  9. {
  10. $function = create_function('', 'return "FOO\n";');
  11. print($function());
  12. $this->functions['test'] = $function;
  13. print($this->functions['test']()); // werkt al niet meer
  14. }
  15. }
  16. $a = new foo ();
  17. ?>
  18. --EXPECT--
  19. FOO
  20. FOO