3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo '<pre>'; const NUM = 10000000; $singleQuotedStringCode = "<?php '" . str_repeat('x', NUM) . "';"; $doubleQuotedStringCode = '<?php "' . str_repeat('x', NUM) . '";'; $startTime = microtime(true); token_get_all($singleQuotedStringCode); $endTime = microtime(true); echo 'Single quotes: ', $endTime - $startTime, ' seconds', "\n"; $startTime = microtime(true); token_get_all($doubleQuotedStringCode); $endTime = microtime(true); echo 'Double quotes: ', $endTime - $startTime, ' seconds', "\n";

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.4.00.0670.08462.58
7.3.120.0540.08462.20
7.3.110.0760.09661.88
7.3.100.0490.07662.44
7.3.90.0600.06362.18
7.3.80.0440.07762.35
7.3.70.0500.06362.24
7.3.60.0450.06562.48
7.3.50.0790.06662.38
7.3.40.0500.05962.44
7.3.30.0620.06262.38
7.3.20.0460.03863.96
7.3.10.0240.05164.26
7.3.00.0230.05864.18
7.2.250.0530.07062.37
7.2.240.0430.08962.70
7.2.230.0570.07762.24
7.2.220.0520.08562.57
7.2.210.0570.07462.68
7.2.200.0400.08162.86
7.2.190.0470.06162.66
7.2.180.0400.09762.75
7.2.170.0440.06462.80
7.2.00.0070.06366.98
7.1.330.0270.05363.43
7.1.320.0290.04863.58
7.1.310.0130.08363.35
7.1.300.0220.05163.28
7.1.290.0260.04963.28
7.1.280.0210.06463.24
7.1.270.0410.04563.45
7.1.260.0200.07763.33
7.1.70.0700.05364.57
7.1.60.0330.09164.93
7.1.50.0770.06764.45
7.1.00.0070.09369.89
7.0.201.3100.06064.24
7.0.140.0200.15069.77
7.0.70.0200.12369.45
7.0.60.0200.11769.34
7.0.50.0070.13069.74
7.0.40.0300.10067.75
7.0.30.0230.13767.75
7.0.20.0230.15367.81
7.0.10.0270.08067.61
7.0.00.0170.12367.76
5.6.280.0170.16768.68
5.6.220.0200.16368.62
5.6.210.0270.15068.32
5.6.200.0370.13068.65
5.6.190.0230.16068.68
5.6.180.0130.17068.76
5.6.170.0200.15068.68
5.6.160.0270.15068.75
5.6.150.0200.16069.03
5.6.140.0400.15068.89
5.6.130.0230.09768.75
5.6.120.0130.13068.90
5.6.110.0230.09068.76
5.6.100.0070.11068.76
5.6.90.0170.16068.58
5.6.80.0200.10068.21
5.6.70.0200.15768.13
5.6.60.0100.12768.12
5.6.50.0030.10368.14
5.6.40.0170.13768.17
5.6.30.0100.09768.10
5.6.20.0070.08768.19
5.6.10.0100.09768.30
5.6.00.0200.10068.05
5.5.360.0300.15368.00
5.5.350.0270.15368.18
5.5.340.0170.15768.55
5.5.330.0230.16368.54
5.5.320.0230.16368.53
5.5.310.0370.10768.63
5.5.300.0100.16068.42
5.5.290.0300.15768.76
5.5.280.0130.09768.53
5.5.270.0100.13368.56
5.5.260.0200.12768.55
5.5.250.0200.16368.37
5.5.240.0270.16068.00
5.5.230.0130.17367.87
5.5.220.0230.09368.02
5.5.210.0100.10068.11
5.5.200.0170.13067.86
5.5.190.0100.10367.98
5.5.180.0130.09767.94
5.5.160.0100.08767.88
5.5.150.0130.08068.07
5.5.140.0170.09067.91
5.5.130.0170.08067.98
5.5.120.0130.15367.86
5.5.110.0230.14768.06
5.5.100.0230.11367.66
5.5.90.0200.13767.84
5.5.80.0300.14367.77
5.5.70.0230.15367.69
5.5.60.0330.13067.79
5.5.50.0100.13067.89
5.5.40.0200.16367.84
5.5.30.0200.16068.41
5.5.20.0200.16767.86
5.5.10.0230.16367.75
5.5.00.0200.10767.67
5.4.450.0230.15066.96
5.4.440.0230.08766.87
5.4.430.0130.09767.04
5.4.420.0070.10766.96
5.4.410.0130.10367.08
5.4.400.0370.14366.76
5.4.390.0230.15366.78
5.4.380.0170.10366.59
5.4.370.0170.09066.66
5.4.360.0030.12067.11
5.4.350.0100.09766.58
5.4.340.0100.09366.79
5.4.320.0100.09766.63
5.4.310.0230.08366.88
5.4.300.0070.09066.58
5.4.290.0100.14066.92
5.4.280.0130.14766.56
5.4.270.0200.15066.38
5.4.260.0300.13066.41
5.4.250.0230.16066.46
5.4.240.0370.15066.55
5.4.230.0330.11066.77
5.4.220.0170.15366.68
5.4.210.0270.14766.62
5.4.200.0230.11766.94
5.4.190.0170.15066.68
5.4.180.0230.15066.61
5.4.170.0130.16766.37
5.4.160.0200.09766.75
5.4.150.0170.09766.71
5.4.140.0030.10763.80
5.4.130.0100.11063.92
5.4.120.0170.13764.33
5.4.110.0300.15764.03
5.4.100.0200.16364.13
5.4.90.0330.15364.15
5.4.80.0330.14364.07
5.4.70.0200.13364.01
5.4.60.0130.10063.88
5.4.50.0270.15364.00
5.4.40.0200.13763.89
5.4.30.0230.15364.11
5.4.20.0230.10764.17
5.4.10.0270.14763.93
5.4.00.0300.13763.43
5.3.290.0100.08062.44
5.3.280.0200.10362.01
5.3.270.0200.16362.20
5.3.260.0270.09362.01
5.3.250.0300.12062.22
5.3.240.0130.16362.02
5.3.230.0130.14361.91
5.3.220.0200.14361.96
5.3.210.0170.13062.09
5.3.200.0200.13762.26
5.3.190.0170.15062.05
5.3.180.0270.13362.32
5.3.170.0130.15061.90
5.3.160.0300.12761.92
5.3.150.0300.13062.27
5.3.140.0200.14361.86
5.3.130.0270.11361.84
5.3.120.0170.08361.95
5.3.110.0130.15062.29
5.3.100.0200.11761.54
5.3.90.0070.16361.53
5.3.80.0100.13761.47
5.3.70.0130.14361.71
5.3.60.0170.12761.44
5.3.50.0270.14061.21
5.3.40.0130.13361.35
5.3.30.0170.11061.34
5.3.20.0200.12060.96
5.3.10.0100.09061.04
5.3.00.0200.08060.92
5.2.170.0070.05712.33
5.2.160.0000.05012.33
5.2.150.0030.05712.33
5.2.140.0030.06012.33
5.2.130.0070.05712.33
5.2.120.0070.03712.33
5.2.110.0000.06312.33
5.2.100.0030.04712.33
5.2.90.0000.06312.33
5.2.80.0070.06312.33
5.2.70.0030.06012.33
5.2.60.0000.06312.33
5.2.50.0030.06712.33
5.2.40.0000.06712.33
5.2.30.0070.05712.33
5.2.20.0000.04312.33
5.2.10.0070.05312.33
5.2.00.0000.06312.33
5.1.60.0030.05712.33
5.1.50.0100.05012.33
5.1.40.0030.04312.33
5.1.30.0000.06012.33
5.1.20.0030.06012.33
5.1.10.0000.05312.33
5.1.00.0030.05712.33
5.0.50.0030.04712.33
5.0.40.0070.04012.33
5.0.30.0030.03712.33
5.0.20.0030.04312.33
5.0.10.0070.03012.33
5.0.00.0070.04012.33
4.4.90.0030.03312.33
4.4.80.0030.03012.33
4.4.70.0030.03712.33
4.4.60.0000.03712.33
4.4.50.0030.03312.33
4.4.40.0030.05012.33
4.4.30.0000.03312.33
4.4.20.0000.03712.33
4.4.10.0070.02712.33
4.4.00.0000.04012.33
4.3.110.0000.03712.33
4.3.100.0070.03012.33
4.3.90.0100.02312.33
4.3.80.0030.04712.33
4.3.70.0000.03712.33
4.3.60.0000.03712.33
4.3.50.0000.03712.33
4.3.40.0000.04712.33
4.3.30.0000.03712.33
4.3.20.0000.04012.33
4.3.10.0070.03012.33
4.3.00.0070.03312.33

preferences:
37.9 ms | 401 KiB | 5 Q