3v4l.org

run code in 300+ PHP versions simultaneously
<?php $offset = strtotime('2000-01-01 00:00:00') * 1000; $time1 = floor(microtime(true) * 1000) - $offset; sleep(1); $time2 = floor(microtime(true) * 1000) - $offset; sleep(1); $time3 = floor(microtime(true) * 1000) - $offset; var_dump(sprintf('%b', $time1)); var_dump(sprintf('%b', $time2)); var_dump(sprintf('%b', $time3)); $datacenter = 1; $machine = 1; $sequence = 1; $id1 = 1 << 63 | $time1 << 22 | $datacenter << 17 | $machine << 12 | $sequence; $id2 = 1 << 63 | $time2 << 22 | $datacenter << 17 | $machine << 12 | $sequence; $id3 = 1 << 63 | $time3 << 22 | $datacenter << 17 | $machine << 12 | $sequence; var_dump(sprintf('%b', $id1)); var_dump(sprintf('%b', $id2)); var_dump(sprintf('%b', $id3)); function bin2base64($entier) { $entier = dechex($entier); $entier = hex2bin($entier); $entier = base64_encode($entier); $entier = str_replace('=', '', $entier); return $entier; } $id1 = bin2base64($id1); $id2 = bin2base64($id2); $id3 = bin2base64($id3); var_dump($id1); var_dump($id2); var_dump($id3);
Output for git.master, git.master_jit
/bin/php-git-master: error while loading shared libraries: libonig.so.5: cannot open shared object file: No such file or directory
Process exited with code 127.

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:
24.56 ms | 405 KiB | 5 Q