3v4l.org

run code in 300+ PHP versions simultaneously
<?php printf("%s\n", PHP_VERSION); echo "\n"; $data = []; $i = 1000; $byteLength = 10000; while ($i--) { $data[] = base64_encode(random_bytes($byteLength)); } // PCRE $max = 100; $start = microtime(true); for ($c = 0; $c < $max; $c++) { for ($i = 0; $i < 1000; $i++) { $value = $data[$i]; false !== preg_match('~~u', $value); } } printf("Took %.7f seconds per execution\n", (microtime(true) - $start) / $max); echo "\n"; // mbstring $max = 100; $start = microtime(true); for ($c = 0; $c < $max; $c++) { for ($i = 0; $i < 1000; $i++) { $value = $data[$i]; false !== mb_check_encoding($value, 'UTF-8'); } } printf("Took %.7f seconds per execution\n", (microtime(true) - $start) / $max);
Output for git.master
8.3.0-dev Took 0.0002482 seconds per execution Took 0.0000385 seconds per execution
Output for git.master_jit
8.3.0-dev Took 0.0002495 seconds per execution Took 0.0000460 seconds per execution

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.35 ms | 406 KiB | 5 Q