3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo extends \ArrayIterator { } $fooReflection = new \ReflectionClass(\Foo::class); $recursiveArrayIteratorReflection = new \ReflectionClass(\RecursiveArrayIterator::class); printf("%d constants in %s, ", count($fooReflection->getConstants()), \Foo::class); if ($fooReflection->getParentClass()) { printf("%s extends %s\n", Foo::class, $fooReflection->getParentClass()->getName()); } printf("%d constants in %s, ", count($recursiveArrayIteratorReflection->getConstants()), \RecursiveArrayIterator::class); if ($recursiveArrayIteratorReflection->getParentClass()) { printf("%s extends %s\n", \RecursiveArrayIterator::class, $recursiveArrayIteratorReflection->getParentClass()->getName()); } printf("%d constants in %s\n", count((new \ReflectionClass(\ArrayIterator::class))->getConstants()), \ArrayIterator::class);
Output for git.master, git.master_jit, rfc.property-hooks
2 constants in Foo, Foo extends ArrayIterator 3 constants in RecursiveArrayIterator, RecursiveArrayIterator extends ArrayIterator 2 constants in ArrayIterator

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:
35.63 ms | 401 KiB | 8 Q