3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyDummyWrapper { /** @var resource */ public $context; public function stream_open() { return true; } public function __call($m, $v): void { var_dump([$m, $v]); } } ini_set('open_basedir', __DIR__); stream_wrapper_register('foo', MyDummyWrapper::class); file_get_contents('foo://test'); ini_set('error_log', 'foo://test');
Output for git.master, git.master_jit
array(2) { [0]=> string(11) "stream_stat" [1]=> array(0) { } } array(2) { [0]=> string(11) "stream_read" [1]=> array(1) { [0]=> int(8192) } } array(2) { [0]=> string(10) "stream_eof" [1]=> array(0) { } } array(2) { [0]=> string(12) "stream_close" [1]=> array(0) { } } Warning: ini_set(): open_basedir restriction in effect. File(foo://test) is not within the allowed path(s): (/in) in /in/AEfvC on line 24

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