3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '$x=0; ((800 + 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.60.0140.00718.50
8.3.50.0110.00418.03
8.3.40.0090.00919.04
8.3.30.0120.00318.96
8.3.20.0040.00421.85
8.3.10.0070.00023.83
8.3.00.0080.00023.65
8.2.180.0090.01316.50
8.2.170.0150.00022.96
8.2.160.0100.00620.29
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0070.00020.89
8.2.120.0040.00426.35
8.2.110.0090.00022.17
8.2.100.0040.00817.84
8.2.90.0050.00319.35
8.2.80.0000.00818.16
8.2.70.0080.00018.04
8.2.60.0090.00017.75
8.2.50.0000.00818.28
8.2.40.0000.00820.51
8.2.30.0040.00420.61
8.2.20.0070.00018.11
8.2.10.0020.00518.00
8.2.00.0040.00418.09
8.1.280.0040.01525.92
8.1.270.0080.00022.14
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0070.00422.55
8.1.230.0110.00020.88
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0050.00317.47
8.1.190.0050.00317.36
8.1.180.0040.00418.10
8.1.170.0030.00618.27
8.1.160.0040.00418.80
8.1.150.0030.00320.31
8.1.140.0000.00717.75
8.1.130.0000.00719.00
8.1.120.0040.00417.37
8.1.110.0040.00417.46
8.1.100.0070.00017.46
8.1.90.0080.00317.43
8.1.80.0070.00017.34
8.1.70.0060.00317.41
8.1.60.0000.00817.63
8.1.50.0040.00417.56
8.1.40.0020.00517.51
8.1.30.0000.00717.68
8.1.20.0040.00417.66
8.1.10.0000.00717.55
8.1.00.0000.00717.53
8.0.300.0070.00019.88
8.0.290.0030.00516.63
8.0.280.0050.00318.37
8.0.270.0030.00317.32
8.0.260.0070.00016.79
8.0.250.0000.00816.93
8.0.240.0060.00316.93
8.0.230.0000.00717.02
8.0.220.0030.00317.00
8.0.210.0000.00716.89
8.0.200.0030.00317.06
8.0.190.0030.00516.99
8.0.180.0040.00416.92
8.0.170.0060.00316.99
8.0.160.0000.00717.00
8.0.150.0030.00416.87
8.0.140.0040.00416.88
8.0.130.0000.00513.40
8.0.120.0040.00416.84
8.0.110.0000.00816.82
8.0.100.0050.00217.02
8.0.90.0040.00416.85
8.0.80.0030.01117.00
8.0.70.0000.00716.84
8.0.60.0000.00716.96
8.0.50.0070.00017.02
8.0.30.0100.00917.13
8.0.20.0070.01217.40
8.0.10.0040.00416.94
8.0.00.0120.00616.79
7.4.330.0020.00215.55
7.4.320.0060.00316.60
7.4.300.0030.00316.63
7.4.290.0040.00316.54
7.4.280.0040.00416.61
7.4.270.0030.00316.59
7.4.260.0000.00716.51
7.4.250.0040.00416.47
7.4.240.0030.00316.58
7.4.230.0000.00816.34
7.4.220.0070.00016.34
7.4.210.0060.00816.55
7.4.200.0030.00416.26
7.4.160.0060.00916.58
7.4.140.0110.00917.86
7.4.130.0130.00416.36
7.4.120.0080.00916.51
7.4.110.0100.00716.38
7.4.100.0080.00816.46
7.4.90.0070.01016.51
7.4.80.0150.00619.39
7.4.70.0120.00916.33
7.4.60.0030.01316.70
7.4.50.0070.01116.55
7.4.40.0080.00816.48
7.4.00.0050.01214.91
7.3.330.0030.00313.19
7.3.320.0000.00613.23
7.3.310.0040.00416.46
7.3.300.0070.00016.31
7.3.290.0080.00816.45
7.3.280.0120.00716.45
7.3.260.0100.01116.48
7.3.250.0110.00616.48
7.3.240.0060.01116.45
7.3.230.0030.01316.33
7.3.210.0060.01016.54
7.3.200.0060.01116.62
7.3.190.0090.00916.49
7.3.180.0070.01016.56
7.3.170.0100.00616.62
7.3.160.0070.01116.45
7.3.120.0090.00614.93
7.3.110.0100.00714.80
7.3.100.0050.00715.04
7.3.90.0070.00814.84
7.3.80.0090.00514.99
7.3.70.0050.00914.91
7.3.60.0010.01114.95
7.3.50.0020.01514.97
7.3.40.0090.00414.88
7.3.30.0050.00614.94
7.3.20.0090.00716.78
7.3.10.0080.00716.56
7.3.00.0000.01116.84
7.2.330.0080.00816.72
7.2.320.0090.00916.63
7.2.310.0170.00016.84
7.2.300.0030.02116.58
7.2.290.0160.00616.86
7.2.250.0100.00815.18
7.2.240.0100.00915.04
7.2.230.0050.01014.98
7.2.220.0080.00815.13
7.2.210.0040.00815.08
7.2.200.0030.01115.16
7.2.190.0060.01115.10
7.2.180.0040.00915.10
7.2.170.0020.01314.99
7.2.60.0030.01016.65
7.2.30.0080.01419.82
7.2.20.0080.01519.88
7.2.10.0150.01020.00
7.2.00.0070.01720.00
7.1.330.0010.01115.86
7.1.320.0060.00715.85
7.1.310.0070.00715.95
7.1.300.0070.00515.94
7.1.290.0040.00615.90
7.1.280.0060.00415.85
7.1.270.0050.00515.86
7.1.260.0020.01015.77
7.1.200.0100.00315.53
7.1.150.0120.00918.39
7.1.140.0080.01218.70
7.1.130.0090.01219.01
7.1.120.0070.01418.61
7.1.110.0090.01018.46
7.1.100.0060.01418.04
7.1.90.0090.01317.99
7.1.80.0140.00818.34
7.1.70.0110.00917.25
7.1.60.0290.01934.80
7.1.50.0260.01934.96
7.1.40.0270.02034.48
7.1.30.0280.01934.43
7.1.20.0270.01934.55
7.1.10.0080.01416.63
7.1.00.0080.01316.59

preferences:
59.52 ms | 401 KiB | 5 Q