3v4l.org

run code in 300+ PHP versions simultaneously
<?php // \Drupal\Core\Entity\EntityInterface interface EntityInterface { public function id(); // ... } // \Drupal\user\UserInterface interface UserInterface extends EntityInterface { // ... } // \Drupal\user\User class User implements UserInterface { public function id() {} } // \Drupal\Core\Entity\OwnedEntityInterface interface OwnedEntityInterface { public function setOwnerId($id); public function getOwnerId(); } // \Drupal\user\EntityOwnerInterface interface EntityOwnerInterface extends OwnedEntityInterface { public function setOwner(UserInterface $owner); public function getOwner(); } // Example class. class OwnedEntity implements EntityOwnerInterface { public function setOwnerId($id) {} public function getOwnerId() {} public function setOwner(UserInterface $owner) {} public function getOwner() {} } $user = new User(); $entity = new OwnedEntity(); $entity->setOwnerId($user->id());
Output for git.master, git.master_jit, rfc.property-hooks

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:
19.12 ms | 401 KiB | 8 Q