3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class test { function a() { echo 'hi'; } } $class = new ReflectionClass('test'); $method = $class->getMethod('a'); echo serialize($method);
based on QR3Ze
Output for 5.0.0 - 5.6.28, 7.0.0 - 7.1.0
O:16:"ReflectionMethod":2:{s:4:"name";s:1:"a";s:5:"class";s:4:"test";}
Output for hhvm-3.10.0 - 3.13.2
Warning: Attempted to serialize unserializable builtin class ReflectionMethod in /in/4iKfL on line 9 N;
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionclass in /in/4iKfL on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionclass in /in/4iKfL on line 7