note 106472 modified in class.reflectionclass by danbrown
| From: | danbrown@php.net | Date: | Fri, 11 Nov 2011 20:03:16 +0000 |
| Subject: | note 106472 modified in class.reflectionclass by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-184404@lists.php.net to get a copy of this message | ||
Unserialized reflection class cause error.
<?php
/**
* abc
*/
class a{}
$ref = new ReflectionClass('a');
$ref = unserialize(serialize($ref));
var_dump($ref);
var_dump($ref->getDocComment());
// object(ReflectionClass)#2 (1) {
// ["name"]=>
// string(1) "a"
// }
// PHP Fatal error: ReflectionClass::getDocComment(): Internal error: Failed to retrieve the
reflection object
?>
--was--
Unserialized reflection class cause error.
<?php
/**
* abc
*/
class a{}
$ref = new ReflectionClass('a');
$ref = unserialize(serialize($ref));
var_dump($ref);
var_dump($ref->getDocComment());
// object(ReflectionClass)#2 (1) {
// ["name"]=>
// string(1) "a"
// }
// PHP Fatal error: ReflectionClass::getDocComment(): Internal error: Failed to retrieve the
reflection object
http://php.net/manual/en/class.reflectionclass.php