php-src/Zend/tests/anon/007.phpt
Xinchen Hui d96dda8d49 Fixed Bug #69761 (Serialization of anonymous classes should be prevented)
And also cleanup anonymous class compiling, it make no sense prefix a
namespace to anonymous class name. and it is always lowcased and
interned string.
2015-06-13 10:49:20 +08:00

24 lines
360 B
PHP

--TEST--
testing anon classes in functions outside of classes in namespaces
--FILE--
<?php
namespace lone {
function my_factory() {
return new class{};
}
class Outer {
public function __construct() {
var_dump(
my_factory());
}
}
new Outer();
}
--EXPECTF--
object(class@%s)#2 (0) {
}