1
0
mirror of https://github.com/php/php-src.git synced 2026-04-11 01:53:36 +02:00
Files
archived-php-src/tests/lang/bug24926.phpt
2018-10-14 12:07:20 -03:00

30 lines
541 B
PHP

--TEST--
Bug #24926 (lambda function (create_function()) cannot be stored in a class property)
--FILE--
<?php
error_reporting (E_ALL);
class foo {
public $functions = array();
function __construct()
{
$function = create_function('', 'return "FOO\n";');
print($function());
$this->functions['test'] = $function;
print($this->functions['test']()); // werkt al niet meer
}
}
$a = new foo ();
?>
--EXPECTF--
Deprecated: Function create_function() is deprecated in %s on line %d
FOO
FOO