3v4l.org

run code in 300+ PHP versions simultaneously
<?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.3.28, 5.4.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.

preferences:
185.41 ms | 1395 KiB | 60 Q