3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL | E_STRICT); $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
resource(5) of type (Unknown) bool(true) bool(true) bool(true) int(0) resource(6) of type (Unknown) bool(true) int(16) bool(true) bool(true) int(0) 2.0001740455627<br/>1412706143.0001<br/>1412706143.005<br/>pid=2<br/>
Output for git.master
resource(5) of type (Unknown) bool(true) bool(true) bool(true) int(0) resource(6) of type (Unknown) bool(true) int(16) bool(true) bool(true) int(0) 2.0002658367157<br/>1412706143.0001<br/>1412706143.0039<br/>pid=2<br/>

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:
77.62 ms | 401 KiB | 7 Q