3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vars = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'); $start = microtime(true); for($k=0;$k<100000;$k++) { $str = ltrim(strrev(chunk_split(implode(array_reverse($vars)), 3, ';')),';'); } $end = microtime(true); echo $end - $start; echo "\n\n"; $start = microtime(true); for($k=0;$k<100000;$k++) { $size = sizeOf($vars); for ($i = $size-3; $i > 0; $i-=3) { array_splice($vars,$i,0,";"); } } $end = microtime(true); echo $end - $start;

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.2.00.0032.49821.48
7.1.70.0032.49818.91
7.1.60.4902.01221.48
7.1.50.4432.05921.14
7.1.00.0032.49724.32
7.0.200.0032.49818.83
7.0.140.0032.49724.05
7.0.60.0102.49022.24
7.0.50.0102.49019.96
7.0.40.0032.49719.87
7.0.30.0232.47719.91
7.0.20.0232.47719.94
7.0.10.0232.47719.74
7.0.00.0102.49019.75
5.6.280.0002.50024.22
5.6.210.0102.47723.59
5.6.200.0032.49721.13
5.6.190.0172.47023.35
5.6.180.0172.48323.43
5.6.170.0202.48023.29
5.6.160.0072.49323.34
5.6.150.0132.48721.13
5.6.140.0032.49721.10
5.6.130.0002.50021.03
5.6.120.0132.48723.88
5.6.110.0032.49724.14
5.6.100.0202.48023.94
5.6.90.0102.49023.95
5.6.80.0032.49723.46
5.5.350.0032.49722.97
5.5.340.0102.49020.50
5.5.330.0032.49722.70
5.5.320.0272.47322.43
5.5.310.0232.47722.06
5.5.300.0072.49320.40
5.5.290.0032.49720.48
5.5.280.0132.48723.41
5.5.270.0072.49323.40
5.5.260.0072.49322.92
5.5.250.0102.49023.25
5.5.240.0132.48722.23
5.4.450.0472.45021.81
5.4.440.3872.11021.36
5.4.430.0132.48321.66
5.4.420.0232.47321.80
5.4.410.0372.46021.23
5.4.400.0232.47321.63
5.4.390.0032.49321.45
5.4.380.0302.46721.44
5.4.370.0132.48321.64
5.4.360.0032.49321.34
5.4.350.0272.47021.54
5.4.340.0372.46021.20
5.4.320.0232.47321.50
5.4.310.4432.05320.86
5.4.300.0232.47321.49
5.4.290.0132.48321.21
5.4.280.0472.45020.75
5.4.270.0232.47321.22
5.4.260.0172.48021.50
5.4.250.0232.47320.72
5.4.240.0272.47020.86
5.4.230.0102.48721.45
5.4.220.0302.46721.05
5.4.210.0272.47020.55
5.4.200.0302.46721.34
5.4.190.0232.47321.52
5.4.180.0202.47721.43
5.4.170.3572.14020.86
5.4.160.2232.27321.03
5.4.150.3502.14721.01
5.4.140.4232.07318.01
5.4.130.0132.48318.84
5.4.120.0202.47718.67
5.4.110.0102.48718.63
5.4.100.0102.48718.66
5.4.90.0102.48718.68
5.4.80.0072.49018.60
5.4.70.0032.49318.88
5.4.60.0232.47318.82
5.4.50.0032.49318.78
5.4.40.0002.49718.77
5.4.30.0202.47718.85
5.4.20.0302.46718.42
5.4.10.3472.15018.41
5.4.00.4332.06317.70

preferences:
35.64 ms | 401 KiB | 5 Q