3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface truc { const OK = 'OK'; } final class A implements truc { } class B extends A { const OK = 'PAS OK'; } echo B::OK;
based on OQGiN
Output for 7.0.0 - 7.2.0
Fatal error: Class B may not inherit from final class (A) in /in/uFaFC on line 12
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Class B may not inherit from final class (A) in /in/uFaFC on line 13
Process exited with code 255.