diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-28 12:41:36 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-28 15:58:23 +0100 |
| commit | ee16d99504f0014c3d292809da927fb622293f41 (patch) | |
| tree | 1b346bc457f2b74a5549159ef2fdf947e08f7eab /tests | |
| parent | 734c305a822581c27ca3608cba482385dc247cf0 (diff) | |
| download | php-git-ee16d99504f0014c3d292809da927fb622293f41.tar.gz | |
Remove create_function()
Deprecated in PHP 7.2 as part of
https://wiki.php.net/rfc/deprecations_php_7_2.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/lang/bug17115.phpt | 17 | ||||
| -rw-r--r-- | tests/lang/bug22690.phpt | 13 | ||||
| -rw-r--r-- | tests/lang/bug24926.phpt | 29 |
3 files changed, 0 insertions, 59 deletions
diff --git a/tests/lang/bug17115.phpt b/tests/lang/bug17115.phpt deleted file mode 100644 index 9500352799..0000000000 --- a/tests/lang/bug17115.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -Bug #17115 (lambda functions produce segfault with static vars) ---FILE-- -<?php -$func = create_function('',' - static $foo = 0; - return $foo++; -'); -var_dump($func()); -var_dump($func()); -var_dump($func()); -?> ---EXPECTF-- -Deprecated: Function create_function() is deprecated in %s on line %d -int(0) -int(1) -int(2) diff --git a/tests/lang/bug22690.phpt b/tests/lang/bug22690.phpt deleted file mode 100644 index 85ddcd3487..0000000000 --- a/tests/lang/bug22690.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -Bug #22690 (ob_start() is broken with create_function() callbacks) ---FILE-- -<?php - $foo = create_function('$s', 'return strtoupper($s);'); - ob_start($foo); - echo $foo("bar\n"); -?> -bar ---EXPECTF-- -Deprecated: Function create_function() is deprecated in %s on line %d -BAR -BAR diff --git a/tests/lang/bug24926.phpt b/tests/lang/bug24926.phpt deleted file mode 100644 index f73d265f38..0000000000 --- a/tests/lang/bug24926.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---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 |
