3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '((db + 20) - 800 / 2)'; $tokens = token_get_all("<?php {$input}"); $expr = ''; foreach($tokens as $token){ if(is_string($token)){ if(in_array($token, array('(', ')', '+', '-', '/', '*'), true)) $expr .= $token; continue; } list($id, $text) = $token; if(in_array($id, array(T_DNUMBER, T_LNUMBER))) $expr .= $text; } eval("\$result = {$expr};"); print "\nexpr = " . $expr; print "\nres = " . $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)
8.3.70.0100.01016.86
8.3.60.0080.00818.43
8.3.50.0110.01117.98
8.3.40.0150.00018.97
8.3.30.0030.01318.85
8.3.20.0040.00720.09
8.3.10.0080.00023.65
8.3.00.0070.00417.93
8.2.180.0110.00718.13
8.2.170.0140.00022.96
8.2.160.0100.00720.51
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00420.87
8.2.110.0070.00322.08
8.2.100.0070.00717.91
8.2.90.0060.00317.75
8.2.80.0000.00818.95
8.2.70.0000.00818.04
8.2.60.0000.00817.80
8.2.50.0000.00818.34
8.2.40.0060.00320.61
8.2.30.0040.00419.20
8.2.20.0040.00418.27
8.2.10.0040.00418.22
8.2.00.0030.00318.19
8.1.280.0080.00825.92
8.1.270.0070.00023.88
8.1.260.0090.00026.35
8.1.250.0070.00028.09
8.1.240.0050.00520.41
8.1.230.0050.00517.77
8.1.220.0050.00317.79
8.1.210.0060.00318.77
8.1.200.0090.00017.35
8.1.190.0060.00317.22
8.1.180.0040.00418.10
8.1.170.0080.00018.59
8.1.160.0000.00818.77
8.1.150.0040.00420.22
8.1.140.0030.00517.72
8.1.130.0030.00318.98
8.1.120.0040.00717.53
8.1.110.0000.00817.35
8.1.100.0040.00817.50
8.1.90.0070.00017.28
8.1.80.0040.00417.36
8.1.70.0000.00717.43
8.1.60.0080.00017.59
8.1.50.0040.00417.48
8.1.40.0070.00017.55
8.1.30.0040.00417.55
8.1.20.0090.00017.49
8.1.10.0040.00417.62
8.1.00.0000.00817.49
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0000.00718.36
8.0.270.0040.00417.17
8.0.260.0030.00316.79
8.0.250.0000.00716.80
8.0.240.0030.00316.98
8.0.230.0030.00316.95
8.0.220.0030.00516.92
8.0.210.0070.00016.80
8.0.200.0000.00716.93
8.0.190.0030.00516.83
8.0.180.0000.00716.80
8.0.170.0060.00616.93
8.0.160.0070.00016.95
8.0.150.0040.00416.88
8.0.140.0060.00316.82
8.0.130.0030.00313.36
8.0.120.0040.00416.88
8.0.110.0040.00416.95
8.0.100.0070.00016.84
8.0.90.0080.00016.68
8.0.80.0090.01216.86
8.0.70.0000.00816.80
8.0.60.0050.00316.87
8.0.50.0000.00716.83
8.0.30.0130.00517.12
8.0.20.0100.00917.40
8.0.10.0000.00716.85
8.0.00.0150.00816.64
7.4.330.0000.00515.55
7.4.320.0070.00016.48
7.4.300.0060.00016.61
7.4.290.0000.00816.63
7.4.280.0000.00816.62
7.4.270.0000.00716.61
7.4.260.0000.00716.52
7.4.250.0070.00016.46
7.4.240.0030.00316.62
7.4.230.0070.00016.35
7.4.220.0040.00416.34
7.4.210.0050.01216.59
7.4.200.0050.00216.70
7.4.160.0060.01116.53
7.4.150.0120.00817.40
7.4.140.0060.01217.86
7.4.130.0060.01016.46
7.4.120.0100.01016.59
7.4.110.0060.01116.56
7.4.100.0080.00816.60
7.4.90.0120.01216.45
7.4.80.0110.00719.39
7.4.70.0140.00716.62
7.4.60.0120.00316.45
7.4.50.0120.00016.37
7.4.40.0100.00716.40
7.4.00.0060.01015.05
7.3.330.0050.00013.27
7.3.320.0030.00313.24
7.3.310.0040.00416.41
7.3.300.0000.00716.24
7.3.290.0090.00616.29
7.3.280.0060.01016.34
7.3.270.0100.00717.40
7.3.260.0080.01316.47
7.3.240.0130.00716.36
7.3.230.0060.00916.73
7.3.210.0070.01016.30
7.3.200.0000.01616.38
7.3.190.0030.01316.22
7.3.180.0090.00616.22
7.3.170.0080.00816.36
7.3.160.0080.00816.55
7.2.330.0030.01316.71
7.2.320.0140.00416.80
7.2.310.0110.00816.43
7.2.300.0120.00616.61
7.2.290.0000.01616.74
7.2.60.0030.00916.92
7.2.20.0520.00417.70
7.2.10.0570.00718.12
7.2.00.0650.01418.09
7.1.200.0060.00615.95
7.1.140.0500.01316.91
7.1.130.0540.01016.48
7.1.120.0700.00716.89
7.1.110.0640.01316.19
7.1.100.0450.00315.90
7.1.90.0450.00715.80
7.1.80.0530.01015.74
7.1.70.0680.01015.50
7.1.60.0690.01033.17
7.1.50.0420.01433.13
7.1.40.0440.01032.77
7.1.30.0850.01432.70
7.1.20.0550.00732.80
7.1.10.0660.00315.01
7.1.00.0400.00614.80

preferences:
68.16 ms | 400 KiB | 5 Q