3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); // ********** test doubles ********** interface ServerRequestInterface {} class ServerRequest implements ServerRequestInterface {} // ********** current interfaces ********** interface DelegateInterface { public function process(ServerRequestInterface $request); } interface MiddlewareInterface { public function process(ServerRequestInterface $request, DelegateInterface $delegate); } // ********** Why I love PHP ********** class MD implements DelegateInterface, MiddlewareInterface { function process(ServerRequestInterface $request, DelegateInterface $delegate = null) { } } // ********** test ********** $md = new MD(); var_dump($md instanceof DelegateInterface); var_dump($md instanceof MiddlewareInterface); $md->process(new ServerRequest(), $md); echo 'I\'m fine'.PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
bool(true) bool(true) I'm fine

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:
108.41 ms | 1551 KiB | 4 Q