<?php
class A
{
private function a()
{
}
}
class B
{
private function a()
{
}
}
$method = new \ReflectionMethod('A', 'a');
var_dump($method->getPrototype());
Fatal error: Uncaught ReflectionException: Method A::a does not have a prototype in /in/bUtLE:19
Stack trace:
#0 /in/bUtLE(19): ReflectionMethod->getPrototype()
#1 {main}
thrown in /in/bUtLE on line 19
Process exited with code 255.
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/bUtLE on line 3
Fatal error: Uncaught ReflectionException: Method A::a does not have a prototype in /in/bUtLE:19
Stack trace:
#0 /in/bUtLE(19): ReflectionMethod->getPrototype()
#1 {main}
thrown in /in/bUtLE on line 19
Process exited with code 255.
Fatal error: Uncaught exception 'ReflectionException' with message 'Method A::a does not have a prototype' in /in/bUtLE:19
Stack trace:
#0 /in/bUtLE(19): ReflectionMethod->getPrototype()
#1 {main}
thrown in /in/bUtLE on line 19
Process exited with code 255.
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.19
Fatal error: Uncaught exception 'ReflectionException' with message 'Method A::a does not have a prototype' in /in/eEIJ5:19
Stack trace:
#0 /in/eEIJ5(19): ReflectionMethod->getPrototype()
#1 {main}
thrown in /in/eEIJ5 on line 19
Process exited with code 255.
Output for 5.1.2 - 5.1.6, 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/eEIJ5 on line 17
Fatal error: Uncaught exception 'ReflectionException' with message 'Method A::a does not have a prototype' in /in/eEIJ5:19
Stack trace:
#0 /in/eEIJ5(19): ReflectionMethod->getPrototype()
#1 {main}
thrown in /in/eEIJ5 on line 19
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/eEIJ5 on line 17
Fatal error: Call to undefined method ReflectionMethod::getPrototype() in /in/eEIJ5 on line 19
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/eEIJ5 on line 5
Process exited with code 255.
Output for 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/eEIJ5 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/eEIJ5 on line 5
Process exited with code 255.
Output for 4.3.0
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/bUtLE on line 5
Process exited with code 255.