3v4l.org

run code in 200+ php & hhvm versions
<?php class A {} class B extends A{} class C extends B{} $b = 'B'; var_dump(is_subclass_of('A', 'A'), is_subclass_of('B', 'A'), is_subclass_of($b, 'A')); var_dump(is_a('A', 'A', true), is_a('B', 'A', true), is_a($b, 'A', true)); $className = 'C'; while($_parentClass = get_parent_class($className)) $parentClass = $_parentClass; var_dump($className, $parentClass);

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
bool(false) bool(true) bool(true) bool(true) bool(true) bool(true)
Process exited with code 137.
Output for Array change keys
bool(false) bool(true) bool(true) bool(true) bool(true) bool(true)
Process exited with code 137.
Output for Lexical anon
bool(false) bool(true) bool(true) bool(true) bool(true) bool(true)
Process exited with code 137.

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