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, $mode, $options, &$opened_path) { $url = parse_url($path); exit($url['host'] . $url['path'] . "\n" . $mode . "\n" . $options . "\n" . $opened_path); //$this->host = parse_url($path, PHP_URL_HOST); //$this->fileHandle = fopen($); 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/RAiUA on line 47 t/e/test.txt r+ 0

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:
41.09 ms | 405 KiB | 9 Q