3v4l.org

run code in 300+ PHP versions simultaneously
<?php $this->error_reporting(E_ALL, true); $profilings=array(microtime(true)); $filename='/tmp/mutex_kv-lock2.lock'; $fo =fopen($filename, 'w'); $result=flock($fo, LOCK_EX | LOCK_NB, $ref); $r1 =flock($fo, LOCK_UN); $r2 =fclose($fo); var_dump($fo,$result,$r1,$r2,$ref);echo "\r\n"; $fo =fopen($filename, 'w+'); $r0 =flock($fo, LOCK_EX, $ref); $r4 =fwrite($fo, (float)$_SERVER['REQUEST_TIME_FLOAT']."\n"); $r1 =flock($fo, LOCK_UN); $r2 =fclose($fo); var_dump($fo,$r0,$r4,$r1,$r2,$ref);echo "\r\n"; unset($fo, $r1, $r2, $r0); sleep(2); $profilings[]=microtime(true); echo ($profilings[1]-$profilings[0]).'<br/>'.(float)$_SERVER['REQUEST_TIME_FLOAT'].'<br/>'.$profilings[0].'<br/>'; echo 'pid='.posix_getpid().'<br/>'; ?>
Output for git.master_jit, git.master
Fatal error: Uncaught Error: Using $this when not in object context in /in/dU9qU:2 Stack trace: #0 {main} thrown in /in/dU9qU on line 2
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:
38.68 ms | 401 KiB | 7 Q