3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Facebook\Entities; class UUID {} abstract class Entity {} interface Friendable {} interface Likeable {} interface Postable {} class User extends Entity implements Friendable, Likeable, Postable { public function __construct($name, UUID $uuid){} public function like(Likebable $entity){} public function friend(User $user){} public function post(Post $post){} } $reflection = new \ReflectionClass(new User('Philip Brown', new UUID(1234))); $interfaces = $reflection->getInterfaceNames(); echo "<pre>"; var_dump($interfaces);
based on LihRm
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
<pre>array(3) { [0]=> string(28) "Facebook\Entities\Friendable" [1]=> string(26) "Facebook\Entities\Likeable" [2]=> string(26) "Facebook\Entities\Postable" }