3v4l.org

run code in 300+ PHP versions simultaneously
<?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);
Output for git.master, git.master_jit, rfc.property-hooks
<pre>array(3) { [0]=> string(28) "Facebook\Entities\Friendable" [1]=> string(26) "Facebook\Entities\Likeable" [2]=> string(26) "Facebook\Entities\Postable" }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
38.3 ms | 401 KiB | 8 Q