3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PosixStream { private $fileHandle = null; private $host; private $position = 0; public function stream_open($path, string $mode, int $options, string &$opened_path) { exit($path . "\n" . $mode . "\n" . $options . "\n" . $opened_path); //$this->host = parse_url($path, PHP_URL_HOST); //$this->fileHandle = fopen($); return true; } public function stream_read($count) { return ''; } public function stream_write($data) { return 0; } public function stream_tell() { return 0; } public function stream_eof() { true; } public function stream_seek($offset, $whence = SEEK_SET) { return false; } public function stream_metadata($path, $option, $value) { exit($path . "\n" . $option . "\n" . $value); return false; } } stream_wrapper_register('steve', 'PosixStream'); $test = fopen('steve://t/e/test.txt', 'r+'); fclose($test);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property PosixStream::$context is deprecated in /in/YoeUn on line 45 Fatal error: Uncaught TypeError: PosixStream::stream_open(): Argument #4 ($opened_path) must be of type string, null given in /in/YoeUn:10 Stack trace: #0 [internal function]: PosixStream->stream_open('steve://t/e/tes...', 'r+', 0, NULL) #1 /in/YoeUn(45): fopen('steve://t/e/tes...', 'r+') #2 {main} thrown in /in/YoeUn on line 10
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:
37.99 ms | 402 KiB | 8 Q