3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function run() { $file = __FILE__ . '.tmp'; register_shutdown_function(function () use ($file) { @unlink($file); }); file_put_contents($file, '<?php self::foo(); ?>'); require $file; } static function foo() { echo 'Hi!', PHP_EOL; } } (new Test)->run();
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_put_contents(/in/cS4JQ.tmp): Failed to open stream: Permission denied in /in/cS4JQ on line 7 Warning: require(/in/cS4JQ.tmp): Failed to open stream: No such file or directory in /in/cS4JQ on line 8 Fatal error: Uncaught Error: Failed opening required '/in/cS4JQ.tmp' (include_path='.:') in /in/cS4JQ:8 Stack trace: #0 /in/cS4JQ(14): Test->run() #1 {main} thrown in /in/cS4JQ on line 8
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:
51.73 ms | 401 KiB | 8 Q