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("\$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.0110.00418.14
8.3.50.0150.01121.99
8.3.40.0070.01418.65
8.3.30.0070.00719.17
8.3.20.0040.00420.16
8.3.10.0080.00021.95
8.3.00.0080.00022.27
8.2.180.0000.01416.38
8.2.170.0140.00722.96
8.2.160.0090.01220.89
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0100.00726.16
8.2.120.0080.00019.19
8.2.110.0030.00622.14
8.2.100.0040.00817.88
8.2.90.0040.00418.03
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0040.00418.25
8.2.30.0070.00018.14
8.2.20.0040.00417.79
8.2.10.0070.00017.63
8.2.00.0000.00717.75
8.1.280.0090.00925.92
8.1.270.0030.00622.25
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0030.00622.42
8.1.230.0060.00620.97
8.1.220.0030.00617.74
8.1.210.0060.00319.03
8.1.200.0040.00717.35
8.1.190.0040.00417.41
8.1.180.0080.00018.45
8.1.170.0090.00018.57
8.1.160.0000.00722.00
8.1.150.0060.00318.59
8.1.140.0070.00017.53
8.1.130.0070.00017.79
8.1.120.0040.00417.49
8.1.110.0040.00417.46
8.1.100.0000.00717.48
8.1.90.0040.00417.49
8.1.80.0080.00017.39
8.1.70.0070.00017.39
8.1.60.0060.00317.57
8.1.50.0000.00717.59
8.1.40.0000.00717.52
8.1.30.0050.00317.59
8.1.20.0050.00317.55
8.1.10.0030.00617.59
8.1.00.0080.00017.53
8.0.300.0000.00719.95
8.0.290.0080.00017.05
8.0.280.0040.00418.45
8.0.270.0030.00317.26
8.0.260.0030.00316.74
8.0.250.0030.00316.94
8.0.240.0070.00016.95
8.0.230.0000.00716.91
8.0.220.0000.00716.94
8.0.210.0040.00316.91
8.0.200.0000.00716.99
8.0.190.0030.00317.00
8.0.180.0040.00416.88
8.0.170.0080.00016.82
8.0.160.0080.00016.96
8.0.150.0070.00016.81
8.0.140.0000.00816.74
8.0.130.0000.00613.24
8.0.120.0040.00416.75
8.0.110.0000.00716.83
8.0.100.0050.00317.01
8.0.90.0040.00416.75
8.0.80.0060.01316.89
8.0.70.0030.00516.71
8.0.60.0000.00716.88
8.0.50.0070.00016.72
8.0.30.0090.01117.07
8.0.20.0130.00817.40
8.0.10.0070.00017.08
8.0.00.0110.00816.68
7.4.330.0020.00215.00
7.4.320.0000.00616.50
7.4.300.0030.00316.61
7.4.290.0000.00816.52
7.4.280.0000.00716.50
7.4.270.0070.00016.52
7.4.260.0050.00316.62
7.4.250.0080.00016.55
7.4.240.0040.00416.50
7.4.230.0020.00516.63
7.4.220.0150.00916.64
7.4.210.0040.01016.62
7.4.200.0040.00416.41
7.4.190.0070.00016.41
7.4.160.0060.01216.47
7.4.150.0100.00717.40
7.4.140.0070.01317.86
7.4.130.0120.00416.53
7.4.120.0110.00916.51
7.4.110.0100.00716.49
7.4.100.0100.00716.58
7.4.90.0130.00616.39
7.4.80.0100.01019.39
7.4.70.0120.00616.37
7.4.60.0110.01016.47
7.4.50.0000.00916.36
7.4.40.0030.01322.77
7.4.30.0090.01316.59
7.4.10.0080.01114.73
7.4.00.0080.01115.03
7.3.330.0000.00613.17
7.3.320.0030.00313.14
7.3.310.0070.00016.41
7.3.300.0030.00316.37
7.3.290.0130.00616.32
7.3.280.0090.00916.34
7.3.270.0120.00617.40
7.3.260.0060.01016.30
7.3.250.0110.00916.61
7.3.240.0100.00716.44
7.3.230.0180.00416.45
7.3.210.0100.00716.63
7.3.200.0160.00019.39
7.3.190.0030.01316.52
7.3.180.0120.00316.50
7.3.170.0100.01016.43
7.3.160.0030.01416.41
7.3.130.0170.00014.69
7.3.120.0070.00814.88
7.3.110.0060.01214.87
7.3.100.0020.01214.86
7.3.90.0080.00514.67
7.3.80.0080.00614.70
7.3.70.0030.01214.81
7.3.60.0030.00614.86
7.3.50.0090.00414.53
7.3.40.0050.00914.78
7.3.30.0030.01014.75
7.3.20.0060.00616.47
7.3.10.0080.00416.64
7.3.00.0060.01016.64
7.2.330.0080.01016.79
7.2.320.0040.01916.52
7.2.310.0000.01716.56
7.2.300.0040.01416.74
7.2.290.0070.01116.52
7.2.260.0060.01015.21
7.2.250.0090.00815.05
7.2.240.0070.00815.00
7.2.230.0070.00915.00
7.2.220.0060.00514.93
7.2.210.0040.01215.24
7.2.200.0040.00814.70
7.2.190.0050.00715.02
7.2.180.0020.01015.04
7.2.170.0030.01114.90
7.2.160.0050.01014.99
7.2.150.0120.00316.87
7.2.140.0020.01516.91
7.2.130.0100.00816.83
7.2.120.0060.01116.82
7.2.110.0080.00516.77
7.2.100.0040.01016.82
7.2.90.0090.00417.01
7.2.80.0060.00916.89
7.2.70.0080.00516.96
7.2.60.0060.01016.93
7.2.50.0050.01016.86
7.2.40.0060.00716.67
7.2.30.0110.00516.99
7.2.20.0060.01217.08
7.2.10.0050.00916.86
7.2.00.0050.01017.84
7.1.330.0080.00515.74
7.1.320.0030.01115.61
7.1.310.0060.00815.80
7.1.300.0050.01115.71
7.1.290.0050.00915.67
7.1.280.0070.00715.59
7.1.270.0040.00815.66
7.1.260.0050.00815.88
7.1.250.0060.00715.72
7.1.240.0080.00715.69
7.1.230.0080.00215.70
7.1.220.0050.00915.58
7.1.210.0020.01015.73
7.1.200.0080.00515.83
7.1.190.0090.00615.81
7.1.180.0030.00915.64
7.1.170.0090.00515.74
7.1.160.0050.00815.72
7.1.150.0040.01015.74
7.1.140.0040.01115.73
7.1.130.0040.01015.94
7.1.120.0080.00715.83
7.1.110.0030.01015.73
7.1.100.0060.00816.50
7.1.90.0090.00415.80
7.1.80.0030.00815.64
7.1.70.0050.00616.34
7.1.60.0030.01417.15
7.1.50.0030.01315.90
7.1.40.0020.01215.79
7.1.30.0030.01115.60
7.1.20.0040.01015.74
7.1.10.0040.00615.63
7.1.00.0070.02817.98
7.0.330.0050.00615.20
7.0.320.0080.00215.01
7.0.310.0050.00315.23
7.0.300.0060.00415.43
7.0.290.0090.00215.24
7.0.280.0050.00615.25
7.0.270.0050.00915.36
7.0.260.0020.01115.32
7.0.250.0060.00815.41
7.0.240.0060.00715.32
7.0.230.0110.00215.50
7.0.220.0040.01115.42
7.0.210.0060.00615.24
7.0.200.0100.00415.63
7.0.190.0030.00915.06
7.0.180.0030.00615.37
7.0.170.0060.00615.49
7.0.160.0040.00715.32
7.0.150.0030.00815.31
7.0.140.0040.03217.50
7.0.130.0090.00715.34
7.0.120.0100.00515.37
7.0.110.0070.01916.88
7.0.100.0080.02316.91
7.0.90.0050.03316.94
7.0.80.0070.03316.91
7.0.70.0070.02916.82
7.0.60.0090.02816.88
7.0.50.0060.03316.89
7.0.40.0030.03515.56
7.0.30.0060.03215.56
7.0.20.0030.03115.54
7.0.10.0070.03315.40
7.0.00.0030.02915.48
5.6.400.0100.00713.98
5.6.390.0020.01114.36
5.6.380.0050.00914.19
5.6.370.0020.00614.36
5.6.360.0050.00714.38
5.6.350.0070.00814.21
5.6.340.0070.00714.47
5.6.330.0080.00914.45
5.6.320.0040.01114.37
5.6.310.0030.01114.21
5.6.300.0050.00714.33
5.6.290.0100.00514.50
5.6.280.0060.03716.57
5.6.270.0030.01214.10
5.6.260.0040.02016.51
5.6.250.0010.02116.46
5.6.240.0070.03316.38
5.6.230.0060.02616.55
5.6.220.0040.03316.37
5.6.210.0120.02716.43
5.6.200.0070.03416.47
5.6.190.0040.03416.37
5.6.180.0010.03716.57
5.6.170.0100.02816.45
5.6.160.0050.03416.43
5.6.150.0040.03016.37
5.6.140.0060.02216.20
5.6.130.0080.03016.50
5.6.120.0080.03016.43
5.6.110.0050.03616.39
5.6.100.0070.03316.38
5.6.90.0110.02516.47
5.6.80.0070.03116.08
5.6.70.0060.03316.18
5.6.60.0090.02716.13
5.6.50.0080.03016.22
5.6.40.0050.02716.26
5.6.30.0050.02916.11
5.6.20.0030.03316.10
5.6.10.0080.03016.21
5.6.00.0030.02816.10
5.5.380.0090.02815.39
5.5.370.0080.02115.48
5.5.360.0070.03215.45
5.5.350.0050.03315.41
5.5.340.0040.03215.51
5.5.330.0090.02515.58
5.5.320.0090.01615.54
5.5.310.0070.02915.63
5.5.300.0060.03315.58
5.5.290.0080.02615.51
5.5.280.0070.02915.40
5.5.270.0070.02115.72
5.5.260.0040.03115.57
5.5.250.0070.03315.42
5.5.240.0100.01915.44
5.5.230.0050.03215.29
5.5.220.0070.02415.19
5.5.210.0060.02915.34
5.5.200.0070.03015.29
5.5.190.0040.02115.09
5.5.180.0050.03115.27
5.5.170.0030.00814.35
5.5.160.0100.02615.39
5.5.150.0040.03215.34
5.5.140.0070.02715.22
5.5.130.0060.02915.22
5.5.120.0070.02015.15
5.5.110.0050.03015.19
5.5.100.0030.03115.04
5.5.90.0050.02915.33
5.5.80.0070.03015.14
5.5.70.0060.02715.18
5.5.60.0080.02415.29
5.5.50.0080.02015.34
5.5.40.0100.02215.30
5.5.30.0070.02715.28
5.5.20.0090.02715.28
5.5.10.0040.02515.11
5.5.00.0030.03315.41
5.4.450.0060.02714.36
5.4.440.0070.02714.23
5.4.430.0050.02914.21
5.4.420.0070.02914.13
5.4.410.0050.02814.19
5.4.400.0060.02514.16
5.4.390.0030.03114.18
5.4.380.0030.02514.12
5.4.370.0030.03114.08
5.4.360.0070.02714.10
5.4.350.0060.02714.04
5.4.340.0050.02714.19
5.4.330.0040.00611.70
5.4.320.0040.01814.08
5.4.310.0030.02914.13
5.4.300.0060.02814.16
5.4.290.0050.01914.07
5.4.280.0070.02514.14
5.4.270.0060.02914.13
5.4.260.0040.02414.12
5.4.250.0060.02914.24
5.4.240.0050.02714.23
5.4.230.0080.02614.20
5.4.220.0030.02914.10
5.4.210.0070.02614.18
5.4.200.0060.02814.07
5.4.190.0070.02914.18
5.4.180.0030.03014.04
5.4.170.0040.02614.10
5.4.160.0040.03114.21
5.4.150.0070.02414.06
5.4.140.0110.02313.22
5.4.130.0040.01813.25
5.4.120.0050.03013.30
5.4.110.0100.02013.16
5.4.100.0040.02913.11
5.4.90.0020.03013.27
5.4.80.0050.02513.24
5.4.70.0060.02113.15
5.4.60.0050.02513.20
5.4.50.0030.02013.10
5.4.40.0020.03113.21
5.4.30.0080.02513.16
5.4.20.0050.01813.10
5.4.10.0020.01913.19
5.4.00.0080.02513.10
5.3.290.0040.02812.57
5.3.280.0070.02412.49
5.3.270.0050.01812.55
5.3.260.0080.02812.51
5.3.250.0050.02912.54
5.3.240.0060.02812.59
5.3.230.0040.02912.55
5.3.220.0020.03312.47
5.3.210.0070.02712.45
5.3.200.0070.02712.50
5.3.190.0060.02812.40
5.3.180.0030.02212.52
5.3.170.0030.03312.52
5.3.160.0020.02512.50
5.3.150.0030.02812.48
5.3.140.0080.01512.47
5.3.130.0050.02412.46
5.3.120.0060.02712.49
5.3.110.0070.02412.50
5.3.100.0020.02312.35
5.3.90.0060.02712.33
5.3.80.0070.02712.31
5.3.70.0040.02212.27
5.3.60.0040.02812.29
5.3.50.0100.02312.20
5.3.40.0080.02512.23
5.3.30.0030.02712.24
5.3.20.0040.02912.20
5.3.10.0060.02412.11
5.3.00.0030.02112.10
5.2.170.0100.06013.02
5.2.160.0170.04713.02
5.2.150.0030.06713.02
5.2.140.0100.05013.02
5.2.130.0070.05713.02
5.2.120.0030.06013.02
5.2.110.0100.05713.02
5.2.100.0100.04713.02
5.2.90.0030.04713.02
5.2.80.0070.06013.02
5.2.70.0030.06013.02
5.2.60.0030.06313.02
5.2.50.0030.05713.02
5.2.40.0100.04713.02
5.2.30.0030.06013.02
5.2.20.0000.06013.02
5.2.10.0030.03013.02
5.2.00.0100.04713.02
5.1.60.0000.05313.02
5.1.50.0100.04313.02
5.1.40.0030.05313.02
5.1.30.0000.04713.02
5.1.20.0030.05713.02
5.1.10.0030.05713.02
5.1.00.0100.05313.02
5.0.50.0070.02313.02
5.0.40.0030.04313.02
5.0.30.0030.06313.02
5.0.20.0070.03713.02
5.0.10.0000.04713.02
5.0.00.0000.07013.02
4.4.90.0000.03713.02
4.4.80.0130.02313.02
4.4.70.0000.02313.02
4.4.60.0030.03713.02
4.4.50.0000.03713.02
4.4.40.0030.05013.02
4.4.30.0030.03313.02
4.4.20.0030.03713.02
4.4.10.0070.03013.02
4.4.00.0000.05713.02
4.3.110.0030.03013.02
4.3.100.0000.03313.02
4.3.90.0100.03013.02
4.3.80.0100.04713.02
4.3.70.0030.03313.02
4.3.60.0030.03713.02
4.3.50.0000.03713.02
4.3.40.0030.04313.02
4.3.30.0030.03713.02
4.3.20.0030.03313.02
4.3.10.0000.03713.02
4.3.00.0000.03013.02

preferences:
43.19 ms | 401 KiB | 5 Q