3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $fileHandles = []; public $files = []; public function baz() { $offset = 15; $this->files[$offset] = tempnam(); if (false === $file || false === $this->fileHandles[$offset] = fopen($this->files[$offset], 'rb')) { throw new RuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable'); } } } $foo = new Foo; $foo->baz(); function set($param) { if ($param > 10) { return $param; } return false; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: tempnam() expects exactly 2 arguments, 0 given in /in/fdZtr:12 Stack trace: #0 /in/fdZtr(12): tempnam() #1 /in/fdZtr(21): Foo->baz() #2 {main} thrown in /in/fdZtr on line 12
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.88 ms | 401 KiB | 8 Q