Merge branch 'PHP-7.4'

* PHP-7.4:
  Add test for bug #73816
This commit is contained in:
Nikita Popov 2020-01-03 11:27:27 +01:00
commit 0e6cff70a5

24
Zend/tests/bug73816.phpt Normal file
View File

@ -0,0 +1,24 @@
--TEST--
Bug #73816: Broken eval(anonymous class)
--FILE--
<?php
function anon()
{
static $i = 0;
return eval(sprintf('return new class { private $prop%s; };', ++$i));
}
var_dump(anon());
var_dump(anon());
?>
--EXPECT--
object(class@anonymous)#1 (1) {
["prop1":"class@anonymous":private]=>
NULL
}
object(class@anonymous)#1 (1) {
["prop2":"class@anonymous":private]=>
NULL
}