mirror of
https://github.com/php/php-src.git
synced 2024-09-24 03:17:26 +00:00
d96dda8d49
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.
16 lines
414 B
PHP
16 lines
414 B
PHP
--TEST--
|
|
Bug #69761 (Serialization of anonymous classes should be prevented)
|
|
--FILE--
|
|
<?php
|
|
$instance = new class('foo') {
|
|
public function __construct($i) {
|
|
}
|
|
};
|
|
var_dump(serialize($instance));
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Exception: Serialization of 'class@%s' is not allowed in %sbug69761.php:%d
|
|
Stack trace:
|
|
#0 %sbug69761.php(%d): serialize(Object(class@%s
|
|
thrown in %sbug69761.php on line %d
|