3v4l.org

run code in 300+ PHP versions simultaneously
<?php $gens = []; for ($i = 0; $i < 1000; $i++) { $entropy=1; if (function_exists("posix_getpid")) $entropy *= posix_getpid(); if (function_exists("memory_get_usage")) $entropy *= memory_get_usage(); list($usec, $sec) = explode(" ", microtime()); $usec *= 1000000; $entropy *= $usec; mt_srand($entropy); $result = mt_rand(); if (in_array($result, $gens)) { echo 'Count: ' . count($gens); echo 'COLLISION: ' . $result; } else { $gens[] = $result; } }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.3.120.0100.01314.87
7.3.110.0000.02615.01
7.3.100.0070.01314.88
7.3.90.0120.01215.12
7.3.80.0110.00714.70
7.3.70.0030.01215.06
7.3.60.0100.01015.04
7.3.50.0090.01614.98
7.3.40.0110.00714.75
7.3.30.0070.01614.54
7.3.20.0030.01316.64
7.3.10.0070.01116.55
7.3.00.0040.01816.47
7.2.240.0100.01315.08
7.2.230.0130.00714.78
7.2.220.0060.01514.91
7.2.210.0030.01615.16
7.2.200.0070.01115.27
7.2.190.0070.01414.95
7.2.180.0040.01815.17
7.2.170.0040.01514.96
7.2.160.0090.01514.94
7.2.150.0060.01216.82
7.2.140.0150.00616.61
7.2.130.0110.00716.87
7.2.120.0150.00616.70
7.2.110.0030.01417.03
7.2.100.0100.01017.05
7.2.90.0030.01617.08
7.2.80.0040.01117.12
7.2.70.0030.01716.64
7.2.60.0060.01217.09
7.2.50.0070.01316.74
7.2.40.0030.01616.89
7.2.30.0060.00916.92
7.2.20.0120.00916.54
7.2.10.0000.01616.57
7.2.00.0100.01016.68
7.1.330.0070.01715.62
7.1.320.0030.01315.80
7.1.310.0070.01115.89
7.1.300.0110.01415.85
7.1.290.0040.01815.62
7.1.280.0060.01315.97
7.1.270.0030.01615.64
7.1.260.0130.00615.87
7.1.250.0090.00915.90
7.1.70.0000.01117.33
7.1.60.0060.02619.36
7.1.50.0070.02517.01
7.1.00.0100.07322.54
7.0.200.0100.00616.64
7.0.60.0170.08320.04
7.0.50.0030.05017.85
7.0.40.0030.04720.27
7.0.30.0600.07320.18
7.0.20.0270.08719.99
7.0.10.0130.07320.03
7.0.00.0100.08020.30
5.6.280.0000.04320.89
5.6.210.0130.08320.74
5.6.200.0070.07718.16
5.6.190.0000.07320.43
5.6.180.0200.06720.39
5.6.170.0230.09720.50
5.6.160.0100.09720.50
5.6.150.0100.07018.20
5.6.140.0170.08718.13
5.6.130.0070.05318.22
5.6.120.0130.07021.18
5.6.110.0170.10021.14
5.6.100.0100.09721.04
5.6.90.0100.06021.03
5.6.80.0030.09020.54
5.5.350.0230.08020.51
5.5.340.0100.09717.98
5.5.330.0030.08320.12
5.5.320.0030.09720.31
5.5.310.0400.08320.31
5.5.300.0100.07718.00
5.5.290.0100.09718.00
5.5.280.0170.09720.83
5.5.270.0070.07720.99
5.5.260.0130.09320.99
5.5.250.0030.05020.57
5.5.240.4000.05020.29

preferences:
33.21 ms | 400 KiB | 5 Q