3v4l.org

run code in 300+ PHP versions simultaneously
<?php stream_wrapper_unregister('file'); stream_wrapper_register('file', InvalidStreamWrapper::class); echo '========file_get_contents' . PHP_EOL; echo file_get_contents('non-exists-file'); echo '========require' . PHP_EOL; require 'non-exists-file'; class InvalidStreamWrapper { public $context; private $content = "<?php echo time() . PHP_EOL; ?>\n"; private $size = 32; private $counter = 0; public function stream_read($count) { if ($this->counter > 2) { return ''; } $this->counter++; return $this->content;; } public function stream_stat() { return ['size' => $this->size]; } public function stream_open($path, $mode, $options, &$opened_path): bool { return true; } public function stream_eof(): bool { return true; } public function stream_set_option($option, $arg1, $arg2) { return true; } }
Output for git.master, git.master_jit
/bin/php-git-master: error while loading shared libraries: libonig.so.5: cannot open shared object file: No such file or directory
Process exited with code 127.
Output for rfc.property-hooks
========file_get_contents <?php echo time() . PHP_EOL; ?> <?php echo time() . PHP_EOL; ?> <?php echo time() . PHP_EOL; ?> ========require 1695458063

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:
28.94 ms | 406 KiB | 5 Q