3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Human { } class Animal { } namespace Interfaces { interface FeelingsInterface { } } class Person extends Human implements Interfaces\FeelingsInterface { } class Dog extends Animal implements Interfaces\FeelingsInterface { } $me = new Person(); $dog = new Dog(); var_dump(class_implements($me)); var_dump(class_implements($dog));
Output for 5.3.0 - 5.4.23
Fatal error: Namespace declaration statement has to be the very first statement in the script in /in/csU9v on line 6
Process exited with code 255.