3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait t { function f() { //do stuff } } class a { function f() { // do stuff } } class c extends a { use t; } $class = new ReflectionClass('c'); foreach ($class->getMethods() as $method) { try { printf('method %s::%s%s', $method->class, $method->name, PHP_EOL); $prototype = $method->getPrototype(); printf('prototype %s::%s%s', $prototype->class, $prototype->name, PHP_EOL); } catch (\ReflectionException $e) { printf('%s%s', $e->getMessage(), PHP_EOL); } }
Output for git.master, git.master_jit, rfc.property-hooks
method c::f Method c::f does not have a prototype

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
39.59 ms | 401 KiB | 8 Q