3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface StreamInterfaceA { public function write($data); } interface StreamInterfaceB { public function write($data); } class Stream implements StreamInterfaceA { public function write($data) { echo $data; } } function outputStreamInterfaceB(StreamInterfaceB $stream) { $stream->write('hello world'); } $stream = new Stream(); outputStreamInterfaceB($stream);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: outputStreamInterfaceB(): Argument #1 ($stream) must be of type StreamInterfaceB, Stream given, called in /in/EFG1e on line 30 and defined in /in/EFG1e:24 Stack trace: #0 /in/EFG1e(30): outputStreamInterfaceB(Object(Stream)) #1 {main} thrown in /in/EFG1e on line 24
Process exited with code 255.

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