3v4l.org

run code in 200+ php & hhvm versions
<?php class BaseObject { } class First extends BaseObject { } $object1 = new First; $object2 = new class extends First { }; echo $className1 = get_class($object1), "\n", $className2 = get_class($object2), "\n"; var_dump(new First instanceof $className2);
Output for 7.2.8
First class@anonymous/in/dSISl0x7f8b1106107b bool(false)
Output for 7.2.6
First class@anonymous/in/dSISl0x7f10e7d8707b bool(false)
Output for 7.2.5
First class@anonymous/in/dSISl0x7f263b44a07b bool(false)
Output for 7.2.4
First class@anonymous/in/dSISl0x7fb2a61e007b bool(false)
Output for 7.2.3
First class@anonymous/in/dSISl0x7fc8d1a4107b bool(false)
Output for 7.2.2
First class@anonymous/in/dSISl0x7f3c0609b07b bool(false)
Output for 7.2.1
First class@anonymous/in/dSISl0x7f827d8ff07b bool(false)
Output for 7.2.0
First class@anonymous/in/dSISl0x7f2b3408307b bool(false)
Output for 7.1.20
First class@anonymous/in/dSISl0x7f763a72f07b bool(false)
Output for 7.1.16
First class@anonymous/in/dSISl0x7fe25520107b bool(false)
Output for 7.1.15
First class@anonymous/in/dSISl0x7f2f504bb07b bool(false)
Output for 7.1.14
First class@anonymous/in/dSISl0x7ff8f1bdc07b bool(false)
Output for 7.1.13
First class@anonymous/in/dSISl0x7fe4bb3a407b bool(false)
Output for 7.1.12
First class@anonymous/in/dSISl0x7f894768e07b bool(false)
Output for 7.1.11
First class@anonymous/in/dSISl0x7fe0a723e07b bool(false)
Output for 7.1.10
First class@anonymous/in/dSISl0x7fa2af3a207b bool(false)
Output for 7.1.9
First class@anonymous/in/dSISl0x7f5290a4607b bool(false)
Output for 7.1.8
First class@anonymous/in/dSISl0x7f2ceec3607b bool(false)
Output for 7.1.7
First class@anonymous/in/dSISl0x7fbd1f6b807b bool(false)
Output for 7.1.6
First class@anonymous/in/dSISl0x7f277cc3007b bool(false)
Output for 7.1.5
First class@anonymous/in/dSISl0x7f904187507b bool(false)
Output for 7.1.4
First class@anonymous/in/dSISl0x7f48fd61007b bool(false)
Output for 7.1.3
First class@anonymous/in/dSISl0x7ff0c409807b bool(false)
Output for 7.1.2
First class@anonymous/in/dSISl0x7f56670f107b bool(false)
Output for 7.1.1
First class@anonymous/in/dSISl0x7fc3518b807b bool(false)
Output for 7.1.0
First class@anonymous/in/dSISl0x7f38be94307b bool(false)
Output for 7.0.27
First class@anonymous/in/dSISl0x7fe0cb06c07b bool(false)
Output for 7.0.26
First class@anonymous/in/dSISl0x7f0f8da3707b bool(false)
Output for 7.0.25
First class@anonymous/in/dSISl0x7f1910fae07b bool(false)
Output for 7.0.24
First class@anonymous/in/dSISl0x7fd9a23ef07b bool(false)
Output for 7.0.23
First class@anonymous/in/dSISl0x7f43029aa07b bool(false)
Output for 7.0.22
First class@anonymous/in/dSISl0x7f8d56d3f07b bool(false)
Output for 7.0.21
First class@anonymous/in/dSISl0x7f819f59207b bool(false)
Output for 7.0.20
First class@anonymous/in/dSISl0x7f2608dd207b bool(false)
Output for 7.0.19
First class@anonymous/in/dSISl0x7f30915e207b bool(false)
Output for 7.0.18
First class@anonymous/in/dSISl0x7f9c897f207b bool(false)
Output for 7.0.17
First class@anonymous/in/dSISl0x7f1bb526907b bool(false)
Output for 7.0.16
First class@anonymous/in/dSISl0x7f98323ca07b bool(false)
Output for 7.0.15
First class@anonymous/in/dSISl0x7f62e15ad07b bool(false)
Output for 7.0.14
First class@anonymous/in/dSISl0x7ff1936f207b bool(false)
Output for 7.0.13
First class@anonymous/in/dSISl0x7fa06c60a07b bool(false)
Output for 7.0.12
First class@anonymous/in/dSISl0x7ff18440907b bool(false)
Output for 7.0.11
First class@anonymous/in/dSISl0x7fe17657607b bool(false)
Output for 7.0.10
First class@anonymous/in/dSISl0x7f5ed4e5707b bool(false)
Output for 7.0.9
First class@anonymous/in/dSISl0x7febb305007b bool(false)
Output for 7.0.8
First class@anonymous/in/dSISl0x7fc93953207b bool(false)
Output for 7.0.7
First class@anonymous/in/dSISl0x7fcea704007b bool(false)
Output for 7.0.6
First class@anonymous/in/dSISl0x7fab3fae407b bool(false)
Output for 7.0.5
First class@anonymous/in/dSISl0x7f63a4e1107b bool(false)
Output for 7.0.4
First class@anonymous/in/dSISl0x7f7f6077807b bool(false)
Output for 7.0.3
First class@anonymous/in/dSISl0x7f4985ed907b bool(false)
Output for 7.0.2
First class@anonymous/in/dSISl0x7feb6c33007b bool(false)
Output for 7.0.1
First class@anonymous/in/dSISl0x7fbd6f47807b bool(false)
Output for 7.0.0
First class@anonymous/in/dSISl0x7f7e284cf07b bool(false)
Output for hhvm-3.21.3 - 3.22.0
First class@anonymous$;4 bool(false)
Output for hhvm-3.18.5
First class@anonymous$;2 bool(false)
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/dSISl on line 10
Process exited with code 255.