<?php
class a {
function b() {}
}
$r = new ReflectionMethod(new a, "b");
var_dump($r->getParameters());
$s = serialize($r);
var_dump($s);
$r = unserialize($s);
var_dump($r->getParameters());
array(0) {
}
Fatal error: Uncaught Exception: Serialization of 'ReflectionMethod' is not allowed in /in/G2I4A:10
Stack trace:
#0 /in/G2I4A(10): serialize(Object(ReflectionMethod))
#1 {main}
thrown in /in/G2I4A on line 10
Process exited with code 255.
array(0) {
}
string(67) "O:16:"ReflectionMethod":2:{s:4:"name";s:1:"b";s:5:"class";s:1:"a";}"
Fatal error: Uncaught Error: Internal error: Failed to retrieve the reflection object in /in/G2I4A:15
Stack trace:
#0 /in/G2I4A(15): ReflectionFunctionAbstract->getParameters()
#1 {main}
thrown in /in/G2I4A on line 15
Process exited with code 255.
array(0) {
}
string(67) "O:16:"ReflectionMethod":2:{s:4:"name";s:1:"b";s:5:"class";s:1:"a";}"
Fatal error: ReflectionFunctionAbstract::getParameters(): Internal error: Failed to retrieve the reflection object in /in/G2I4A on line 15
Process exited with code 255.
array(0) {
}
string(67) "O:16:"ReflectionMethod":2:{s:4:"name";s:1:"b";s:5:"class";s:1:"a";}"
Fatal error: Internal error: Failed to retrieve the reflection object in /in/G2I4A on line 15
Process exited with code 255.
Output for 5.0.0 - 5.0.2
array(0) {
}
string(67) "O:16:"ReflectionMethod":2:{s:5:"class";s:1:"a";s:4:"name";s:1:"b";}"
Fatal error: Internal error: Failed to retrieve the reflection object in /in/G2I4A on line 15
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/G2I4A on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/G2I4A on line 7