3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { } class B extends A { } $x = 'B'; var_dump( is_subclass_of( $x, A ) );
Output for 7.2.0
Warning: Use of undefined constant A - assumed 'A' (this will throw an Error in a future version of PHP) in /in/0JdnM on line 12 bool(true)
Output for 5.0.3 - 7.1.7
Notice: Use of undefined constant A - assumed 'A' in /in/0JdnM on line 12 bool(true)
Output for 4.3.0 - 5.0.2
Notice: Use of undefined constant A - assumed 'A' in /in/0JdnM on line 12 bool(false)