bug24926.phpt 541 B

1234567891011121314151617181920212223242526272829
  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 __construct()
  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. --EXPECTF--
  19. Deprecated: Function create_function() is deprecated in %s on line %d
  20. FOO
  21. FOO