3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '((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("<?php $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.0120.00616.88
8.3.50.0070.01021.94
8.3.40.0110.00419.09
8.3.30.0060.00919.34
8.3.20.0020.00520.48
8.3.10.0040.00423.61
8.3.00.0090.00019.27
8.2.180.0100.00716.63
8.2.170.0110.00322.96
8.2.160.0130.00320.44
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0110.00426.16
8.2.120.0070.00022.25
8.2.110.0060.00320.82
8.2.100.0110.00018.16
8.2.90.0040.00419.26
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0030.00618.16
8.2.50.0040.00418.16
8.2.40.0030.00520.45
8.2.30.0000.00821.23
8.2.20.0040.00417.74
8.2.10.0080.00019.64
8.2.00.0040.00417.87
8.1.280.0040.01125.92
8.1.270.0040.00424.00
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0030.00722.51
8.1.230.0080.00320.18
8.1.220.0030.00617.76
8.1.210.0040.00418.77
8.1.200.0030.00617.38
8.1.190.0060.00317.23
8.1.180.0000.00818.10
8.1.170.0000.00818.71
8.1.160.0080.00018.92
8.1.150.0040.00420.10
8.1.140.0030.00617.39
8.1.130.0000.00820.20
8.1.120.0000.00717.47
8.1.110.0000.00817.43
8.1.100.0000.01117.37
8.1.90.0040.00417.32
8.1.80.0020.00517.41
8.1.70.0040.00417.34
8.1.60.0000.00817.62
8.1.50.0000.00717.55
8.1.40.0030.00517.54
8.1.30.0040.00417.53
8.1.20.0000.00717.63
8.1.10.0080.00017.46
8.1.00.0000.01017.39
8.0.300.0040.00418.77
8.0.290.0080.00016.74
8.0.280.0070.00018.52
8.0.270.0040.00417.21
8.0.260.0030.00319.96
8.0.250.0000.00816.98
8.0.240.0040.00416.94
8.0.230.0000.00717.08
8.0.220.0030.00317.01
8.0.210.0000.00816.97
8.0.200.0000.00617.04
8.0.190.0020.00517.00
8.0.180.0090.00016.89
8.0.170.0030.00516.88
8.0.160.0040.00416.96
8.0.150.0080.00016.99
8.0.140.0070.00016.92
8.0.130.0000.00613.43
8.0.120.0050.00316.94
8.0.110.0070.00016.87
8.0.100.0030.00516.86
8.0.90.0080.00016.77
8.0.80.0120.00317.04
8.0.70.0000.00716.94
8.0.60.0030.00517.04
8.0.50.0000.00716.77
8.0.30.0140.00417.24
8.0.20.0080.01317.40
8.0.10.0040.00416.98
8.0.00.0090.01116.84
7.4.330.0000.00515.21
7.4.320.0030.00316.54
7.4.300.0030.00316.54
7.4.290.0030.00516.48
7.4.280.0050.00216.54
7.4.270.0040.00416.48
7.4.260.0070.00416.62
7.4.250.0040.00416.60
7.4.240.0020.00516.53
7.4.230.0040.00416.63
7.4.220.0120.00616.66
7.4.210.0090.00716.58
7.4.200.0030.00316.70
7.4.190.0000.00716.75
7.4.160.0040.01216.61
7.4.150.0100.01317.40
7.4.140.0160.00817.86
7.4.130.0040.01216.58
7.4.120.0100.00716.57
7.4.110.0060.00916.53
7.4.100.0060.01216.66
7.4.90.0070.01016.62
7.4.80.0090.00919.39
7.4.70.0040.01216.61
7.4.60.0080.00816.76
7.4.50.0020.00216.20
7.4.40.0040.01122.77
7.4.30.0060.01116.60
7.4.00.0070.00714.93
7.3.330.0000.00513.41
7.3.320.0050.00013.19
7.3.310.0060.00016.33
7.3.300.0030.00316.39
7.3.290.0140.00616.42
7.3.280.0080.01016.39
7.3.270.0140.01217.40
7.3.260.0030.01316.52
7.3.250.0100.00816.51
7.3.240.0050.01216.38
7.3.230.0070.01016.53
7.3.210.0100.00616.48
7.3.200.0130.00919.39
7.3.190.0120.00416.35
7.3.180.0160.00416.51
7.3.170.0110.01116.49
7.3.160.0080.00816.42
7.3.120.0030.01314.94
7.3.110.0060.00614.93
7.3.100.0130.00314.58
7.3.90.0070.00714.76
7.3.80.0030.01015.12
7.3.70.0060.00614.95
7.3.60.0080.00614.90
7.3.50.0030.01015.06
7.3.40.0090.00614.89
7.3.30.0120.00314.99
7.3.20.0110.00316.80
7.3.10.0000.01016.64
7.3.00.0040.00716.86
7.2.330.0100.00716.78
7.2.320.0080.00816.84
7.2.310.0130.00616.68
7.2.300.0040.01116.67
7.2.290.0040.01216.62
7.2.240.0000.01514.80
7.2.230.0070.01015.18
7.2.220.0100.00614.89
7.2.210.0090.00315.30
7.2.200.0030.01015.04
7.2.190.0060.00915.14
7.2.180.0120.00315.13
7.2.170.0130.00315.10
7.2.160.0030.01215.23
7.2.150.0060.00617.02
7.2.140.0040.01216.83
7.2.130.0070.01117.09
7.2.120.0060.01016.79
7.2.110.0090.00616.95
7.2.100.0040.01417.11
7.2.90.0070.00717.06
7.2.80.0080.00816.95
7.2.70.0070.01016.88
7.2.60.0040.00816.87
7.2.50.0030.01317.15
7.2.40.0100.00617.09
7.2.30.0070.01116.77
7.2.20.0070.01016.99
7.2.10.0070.01116.99
7.2.00.0030.00818.25
7.1.330.0070.00715.85
7.1.320.0030.00715.79
7.1.310.0070.01016.05
7.1.300.0070.00715.95
7.1.290.0120.00315.89
7.1.280.0030.01016.02
7.1.270.0060.00315.86
7.1.260.0070.00315.98
7.1.250.0060.01015.89
7.1.200.0060.00615.87
7.1.100.0000.01118.27
7.1.70.0070.00017.04
7.1.60.0130.01019.29
7.1.50.0070.01417.08
7.1.00.0070.07322.36
7.0.200.0000.01016.83
7.0.140.0030.07321.98
7.0.80.0600.08719.93
7.0.70.0600.07719.90
7.0.60.0600.07720.00
7.0.50.0470.06320.34
7.0.40.0170.06319.96
7.0.30.0170.05719.98
7.0.20.0070.08720.10
7.0.10.0170.05720.11
7.0.00.0030.05020.09
5.6.280.0030.07321.14
5.6.230.0130.08320.48
5.6.220.0100.08720.61
5.6.210.0070.08720.61
5.6.200.0100.08021.09
5.6.190.0070.07321.00
5.6.180.0130.07021.08
5.6.170.0030.09020.93
5.6.160.0100.07021.10
5.6.150.0130.07721.02
5.6.140.0100.08721.01
5.6.130.0100.08321.16
5.6.120.0030.08321.10
5.6.110.0070.08021.11
5.6.100.0130.06020.91
5.6.90.0070.08321.02
5.6.80.0030.06020.46
5.6.70.0230.06720.40
5.6.60.0130.05720.42
5.6.50.0070.08020.34
5.6.40.0100.08020.30
5.6.30.0100.06320.53
5.6.20.0030.07720.52
5.6.10.0130.05020.34
5.6.00.0030.04320.42
5.5.370.0070.08020.37
5.5.360.0200.06320.43
5.5.350.0000.05720.41
5.5.340.0100.08020.90
5.5.330.0200.05020.78
5.5.320.0130.08020.80
5.5.310.0070.05020.73
5.5.300.0100.08020.83
5.5.290.0170.07320.64
5.5.280.0070.05720.64
5.5.270.0100.08720.79
5.5.260.0070.08320.86
5.5.250.0100.05020.54
5.5.240.0200.06720.21
5.5.230.0030.08720.21
5.5.220.0100.04320.26
5.5.210.0030.08020.27
5.5.200.0070.08020.24
5.5.190.0100.07720.21
5.5.180.0100.07020.06
5.5.160.0130.06020.25
5.5.150.0130.04020.22
5.5.140.0100.03320.23
5.5.130.0070.03720.28
5.5.120.0030.04320.25
5.5.110.0000.04320.17
5.5.100.0030.04020.08
5.5.90.0000.04720.12
5.5.80.0100.05720.13
5.5.70.0000.04719.99
5.5.60.0100.06320.10
5.5.50.0030.05720.05
5.5.40.0130.07320.07
5.5.30.0070.08320.04
5.5.20.0070.06019.99
5.5.10.0100.05319.96
5.5.00.0100.03319.98
5.4.450.0030.05019.23
5.4.440.0100.04719.36
5.4.430.0100.08019.37
5.4.420.0030.08319.46
5.4.410.0030.08719.07
5.4.400.0070.04319.05
5.4.390.0100.07319.14
5.4.380.0070.07718.88
5.4.370.0130.07018.95
5.4.360.0070.07719.18
5.4.350.0100.07019.09
5.4.340.0070.08019.03
5.4.320.0070.03719.23
5.4.310.0070.06319.03
5.4.300.0100.03719.23
5.4.290.0070.03719.03
5.4.280.0070.04018.90
5.4.270.0030.04018.94
5.4.260.0000.04718.90
5.4.250.0070.04019.06
5.4.240.0030.03719.13
5.4.230.0000.04319.04
5.4.220.0230.06718.89
5.4.210.0070.05019.04
5.4.200.0100.04719.03
5.4.190.0100.07718.84
5.4.180.0100.03318.89
5.4.170.0100.05018.89
5.4.160.0030.03719.05
5.4.150.0130.06319.11
5.4.140.0070.07016.43
5.4.130.0100.06016.43
5.4.120.0030.03716.42
5.4.110.0100.04016.36
5.4.100.0100.03016.39
5.4.90.0070.03316.43
5.4.80.0030.03716.48
5.4.70.0130.03316.49
5.4.60.0000.04016.43
5.4.50.0100.06016.47
5.4.40.0070.03316.41
5.4.30.0000.04316.39
5.4.20.0000.04016.44
5.4.10.0070.03316.48
5.4.00.0070.03315.90
5.3.290.0030.03714.54
5.3.280.0030.05714.45
5.3.270.0130.03714.49
5.3.260.0030.04014.59
5.3.250.0000.04314.48
5.3.240.0070.03714.61
5.3.230.0030.04014.58
5.3.220.0070.03314.58
5.3.210.0070.03714.45
5.3.200.0000.04014.54
5.3.190.0000.04014.53
5.3.180.0070.03714.45
5.3.170.0030.04014.58
5.3.160.0030.05014.59
5.3.150.0030.06014.45
5.3.140.0030.04314.55
5.3.130.0130.03314.57
5.3.120.0100.06014.38
5.3.110.0070.03714.43
5.3.100.0070.03314.06
5.3.90.0030.04013.90
5.3.80.0070.04014.02
5.3.70.0100.03014.01
5.3.60.0100.07313.95
5.3.50.0000.05313.95
5.3.40.0070.03713.92
5.3.30.0030.03313.92
5.3.20.0000.03713.66
5.3.10.0000.03713.67
5.3.00.0000.05713.42
5.2.170.0000.04711.66
5.2.160.0030.04311.66
5.2.150.0030.04711.66
5.2.140.0070.02711.66
5.2.130.0000.03011.66
5.2.120.0000.03011.66
5.2.110.0030.02311.66
5.2.100.0000.04711.66
5.2.90.0000.02711.66
5.2.80.0000.03011.66
5.2.70.0000.03011.66
5.2.60.0130.02011.66
5.2.50.0030.03011.66
5.2.40.0030.03711.66
5.2.30.0070.06011.66
5.2.20.0000.06711.66
5.2.10.0100.02311.66
5.2.00.0000.03311.66
5.1.60.0070.04711.66
5.1.50.0070.04011.66
5.1.40.0070.05011.66
5.1.30.0070.05011.66
5.1.20.0000.05011.66
5.1.10.0070.05711.66
5.1.00.0000.06011.66
5.0.50.0030.03011.66
5.0.40.0030.02011.66
5.0.30.0030.04011.66
5.0.20.0030.04711.66
5.0.10.0030.02011.66
5.0.00.0070.05311.66
4.4.90.0030.01311.66
4.4.80.0000.01311.66
4.4.70.0000.01711.66
4.4.60.0030.01311.66
4.4.50.0000.02011.66
4.4.40.0000.05011.66
4.4.30.0000.03711.66
4.4.20.0100.03011.66
4.4.10.0000.03311.66
4.4.00.0070.05311.66
4.3.110.0030.03011.66
4.3.100.0000.01711.66
4.3.90.0000.01711.66
4.3.80.0000.03311.66
4.3.70.0030.03311.66
4.3.60.0070.01011.66
4.3.50.0000.03711.66
4.3.40.0030.05011.66
4.3.30.0000.02311.66
4.3.20.0030.03311.66
4.3.10.0070.02311.66
4.3.00.0030.03311.66

preferences:
48.07 ms | 401 KiB | 5 Q