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; } 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.0030.01718.68
8.3.50.0130.00721.14
8.3.40.0120.00318.84
8.3.30.0090.00618.70
8.3.20.0080.00018.90
8.3.10.0040.00421.04
8.3.00.0040.00423.40
8.2.180.0100.01316.75
8.2.170.0110.00422.96
8.2.160.0070.00720.43
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0080.00026.16
8.2.120.0000.00721.07
8.2.110.0080.00321.12
8.2.100.0070.00418.03
8.2.90.0080.00019.22
8.2.80.0000.00817.97
8.2.70.0000.00817.75
8.2.60.0000.00818.16
8.2.50.0090.00318.07
8.2.40.0040.00418.34
8.2.30.0030.00619.36
8.2.20.0050.00217.66
8.2.10.0040.00417.73
8.2.00.0040.00417.80
8.1.280.0120.00925.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00623.96
8.1.230.0000.01121.04
8.1.220.0040.00418.77
8.1.210.0000.00818.85
8.1.200.0060.00317.23
8.1.190.0000.00817.53
8.1.180.0040.00418.10
8.1.170.0000.00818.66
8.1.160.0080.00018.86
8.1.150.0040.00718.52
8.1.140.0000.00717.47
8.1.130.0030.00317.79
8.1.120.0030.00517.41
8.1.110.0030.00817.35
8.1.100.0000.00717.49
8.1.90.0000.00917.37
8.1.80.0050.00217.46
8.1.70.0030.00317.34
8.1.60.0000.00917.51
8.1.50.0000.00817.49
8.1.40.0000.00917.52
8.1.30.0040.00417.61
8.1.20.0000.00917.51
8.1.10.0050.00317.59
8.1.00.0030.00817.54
8.0.300.0040.00420.03
8.0.290.0040.00417.15
8.0.280.0040.00418.49
8.0.270.0000.00717.17
8.0.260.0000.00816.76
8.0.250.0070.00017.02
8.0.240.0030.00717.07
8.0.230.0030.00317.03
8.0.220.0030.00316.87
8.0.210.0030.00316.98
8.0.200.0060.00017.00
8.0.190.0040.00416.89
8.0.180.0080.00016.97
8.0.170.0030.00616.84
8.0.160.0000.00717.07
8.0.150.0080.00016.91
8.0.140.0000.00716.91
8.0.130.0000.00613.42
8.0.120.0030.00516.93
8.0.110.0040.00416.97
8.0.100.0040.00417.00
8.0.90.0050.00316.75
8.0.80.0070.01416.83
8.0.70.0000.00816.99
8.0.60.0000.00716.91
8.0.50.0040.00416.91
8.0.30.0110.01017.22
8.0.20.0170.00517.45
8.0.10.0030.00516.97
8.0.00.0110.00916.76
7.4.330.0000.00516.77
7.4.320.0030.00316.53
7.4.300.0030.00316.63
7.4.290.0000.00716.49
7.4.280.0030.00316.50
7.4.270.0070.00016.50
7.4.260.0000.00513.28
7.4.250.0030.00516.53
7.4.240.0030.00316.54
7.4.230.0030.00316.61
7.4.220.0160.00616.51
7.4.210.0090.00616.57
7.4.200.0070.00016.51
7.4.190.0000.00716.64
7.4.160.0150.00616.61
7.4.150.0030.01617.40
7.4.140.0140.00317.86
7.4.130.0110.00816.51
7.4.120.0050.01216.55
7.4.110.0150.00916.33
7.4.100.0070.01416.55
7.4.90.0070.01016.43
7.4.80.0120.00619.39
7.4.70.0090.00916.59
7.4.60.0120.00916.45
7.4.50.0040.00416.47
7.4.40.0100.00322.77
7.4.30.0060.00916.61
7.4.10.0090.01015.67
7.4.00.0070.00915.59
7.3.330.0050.00013.26
7.3.320.0050.00013.04
7.3.310.0040.00416.25
7.3.300.0000.00616.42
7.3.290.0090.00916.38
7.3.280.0060.00916.37
7.3.270.0110.00717.40
7.3.260.0110.00818.24
7.3.250.0130.00616.45
7.3.240.0110.01116.37
7.3.230.0070.01016.39
7.3.210.0070.01016.59
7.3.200.0090.02019.39
7.3.190.0090.01216.42
7.3.180.0090.00616.52
7.3.170.0130.00316.61
7.3.160.0090.00616.42
7.3.130.0080.00815.60
7.3.120.0050.01115.44
7.3.110.0050.01215.47
7.3.100.0080.00515.63
7.3.90.0060.00915.43
7.3.80.0030.01015.68
7.3.70.0050.00515.58
7.3.60.0090.00615.50
7.3.50.0040.00515.66
7.3.40.0060.00815.57
7.3.30.0070.00515.51
7.3.20.0070.00917.33
7.3.10.0060.01017.48
7.3.00.0060.01017.31
7.2.330.0130.00316.54
7.2.320.0130.01016.78
7.2.310.0090.00916.86
7.2.300.0100.00716.69
7.2.290.0180.00316.85
7.2.260.0040.01215.85
7.2.250.0080.01115.77
7.2.240.0050.00915.89
7.2.230.0020.01916.00
7.2.220.0050.01415.68
7.2.210.0060.00815.75
7.2.200.0050.00815.83
7.2.190.0080.00915.81
7.2.180.0070.00515.67
7.2.170.0090.00315.67
7.2.160.0070.00715.69
7.2.150.0050.00717.62
7.2.140.0090.00417.72
7.2.130.0050.01117.86
7.2.120.0030.00817.61
7.2.110.0130.00517.64
7.2.100.0090.00717.74
7.2.90.0060.00917.66
7.2.80.0040.01117.63
7.2.70.0110.00617.72
7.2.60.0060.00817.53
7.2.50.0060.00817.67
7.2.40.0000.01217.61
7.2.30.0050.01017.61
7.2.20.0060.01117.57
7.2.10.0040.00917.71
7.2.00.0050.00718.22
7.1.330.0080.00516.67
7.1.320.0070.00716.65
7.1.310.0020.00916.71
7.1.300.0110.00116.69
7.1.290.0080.00516.61
7.1.280.0050.00616.45
7.1.270.0040.00716.64
7.1.260.0060.00716.60
7.1.250.0070.00716.67
7.1.240.0050.00916.61
7.1.230.0080.00516.71
7.1.220.0050.00716.57
7.1.210.0040.01116.49
7.1.200.0030.00916.63
7.1.190.0020.00916.47
7.1.180.0100.00516.60
7.1.170.0100.00616.60
7.1.160.0050.00616.58
7.1.150.0060.00616.63
7.1.140.0050.00716.55
7.1.130.0080.00616.62
7.1.120.0100.00316.67
7.1.110.0080.00616.52
7.1.100.0040.00917.14
7.1.90.0090.00416.65
7.1.80.0040.00616.40
7.1.70.0040.00816.83
7.1.60.0040.00716.87
7.1.50.0070.01016.72
7.1.40.0070.00616.46
7.1.30.0070.00716.46
7.1.20.0070.00516.63
7.1.10.0090.00516.49
7.1.00.0040.02818.49
7.0.330.0020.01116.31
7.0.320.0070.00716.10
7.0.310.0080.00716.22
7.0.300.0090.00516.15
7.0.290.0040.00816.30
7.0.280.0080.00616.25
7.0.270.0060.00716.15
7.0.260.0110.00316.14
7.0.250.0040.00916.29
7.0.240.0020.01116.33
7.0.230.0050.00716.32
7.0.220.0030.00816.07
7.0.210.0030.01116.29
7.0.200.0060.01016.42
7.0.190.0060.00716.20
7.0.180.0030.01016.22
7.0.170.0020.01016.25
7.0.160.0060.00616.32
7.0.150.0030.00816.27
7.0.140.0050.03018.16
7.0.130.0040.00916.29
7.0.120.0090.00516.21
7.0.110.0050.00616.19
7.0.100.0080.00516.32
7.0.90.0070.00716.16
7.0.80.0030.01016.18
7.0.70.0040.01918.04
7.0.60.0040.01918.08
7.0.50.0050.01818.15
7.0.40.0020.02016.23
7.0.30.0050.01716.17
7.0.20.0040.03216.16
7.0.10.0030.02116.21
7.0.00.0040.03416.17
5.6.400.0060.00714.86
5.6.390.0050.00815.18
5.6.380.0080.00715.34
5.6.370.0040.01215.13
5.6.360.0060.00915.33
5.6.350.0050.00815.01
5.6.340.0050.01015.33
5.6.330.0090.00215.21
5.6.320.0020.01115.22
5.6.310.0030.01315.24
5.6.300.0100.00515.03
5.6.290.0080.00615.28
5.6.280.0060.02817.21
5.6.270.0010.01215.26
5.6.260.0030.01015.01
5.6.250.0030.01015.27
5.6.240.0070.00515.00
5.6.230.0030.01215.11
5.6.220.0030.02116.99
5.6.210.0040.02016.97
5.6.200.0030.02217.18
5.6.190.0040.01617.11
5.6.180.0050.02317.00
5.6.170.0050.03417.04
5.6.160.0070.03117.13
5.6.150.0040.03617.02
5.6.140.0060.02216.98
5.6.130.0040.02417.18
5.6.120.0060.02817.15
5.6.110.0040.03217.05
5.6.100.0090.02717.17
5.6.90.0060.03117.02
5.6.80.0040.02516.84
5.6.70.0030.03116.87
5.6.60.0060.02816.71
5.6.50.0090.02816.71
5.6.40.0060.02716.88
5.6.30.0010.02816.94
5.6.20.0030.02116.83
5.6.10.0040.03016.87
5.6.00.0130.02716.78
5.5.380.0060.00714.97
5.5.370.0090.00515.07
5.5.360.0030.02016.83
5.5.350.0000.02116.97
5.5.340.0040.02216.94
5.5.330.0030.02016.99
5.5.320.0050.01616.95
5.5.310.0060.03217.02
5.5.300.0040.03216.87
5.5.290.0050.02316.87
5.5.280.0040.02516.99
5.5.270.0060.03116.91
5.5.260.0050.03017.00
5.5.250.0040.03116.77
5.5.240.0050.03116.74
5.5.230.0060.02916.69
5.5.220.0020.03416.57
5.5.210.0060.03116.70
5.5.200.0050.02916.74
5.5.190.0030.03216.83
5.5.180.0090.03116.78
5.5.170.0050.00514.99
5.5.160.0060.02616.75
5.5.150.0100.02316.54
5.5.140.0050.02716.75
5.5.130.0040.02516.70
5.5.120.0030.02516.68
5.5.110.0030.02416.85
5.5.100.0090.01916.75
5.5.90.0050.02316.67
5.5.80.0070.02916.80
5.5.70.0050.03416.71
5.5.60.0050.02816.74
5.5.50.0050.02216.71
5.5.40.0070.01616.59
5.5.30.0050.03216.64
5.5.20.0050.03016.65
5.5.10.0040.02516.66
5.5.00.0050.02116.69
5.4.450.0070.03014.70
5.4.440.0020.02014.69
5.4.430.0040.03014.69
5.4.420.0060.02814.71
5.4.410.0070.02814.64
5.4.400.0020.02914.60
5.4.390.0040.03114.56
5.4.380.0040.02314.54
5.4.370.0070.02314.46
5.4.360.0050.02014.57
5.4.350.0080.02914.61
5.4.340.0060.01714.65
5.4.330.0080.00312.43
5.4.320.0080.02314.62
5.4.310.0030.03014.66
5.4.300.0060.01914.64
5.4.290.0040.02414.59
5.4.280.0080.02014.53
5.4.270.0060.02914.68
5.4.260.0060.02114.62
5.4.250.0040.02414.64
5.4.240.0010.03414.54
5.4.230.0010.03414.58
5.4.220.0060.02814.64
5.4.210.0050.03114.65
5.4.200.0050.02314.63
5.4.190.0050.02214.67
5.4.180.0060.03014.55
5.4.170.0040.02214.58
5.4.160.0070.03014.63
5.4.150.0050.02814.59
5.4.140.0060.02913.77
5.4.130.0010.02913.70
5.4.120.0030.02813.70
5.4.110.0040.02913.69
5.4.100.0030.03013.75
5.4.90.0040.02913.68
5.4.80.0050.02813.68
5.4.70.0020.02913.69
5.4.60.0040.02913.64
5.4.50.0060.03013.74
5.4.40.0020.02013.77
5.4.30.0040.02913.70
5.4.20.0020.02213.64
5.4.10.0030.03113.65
5.4.00.0040.02013.54
5.3.290.0070.02313.33
5.3.280.0050.02913.29
5.3.270.0050.03113.30
5.3.260.0100.02413.34
5.3.250.0060.03013.28
5.3.240.0070.02113.33
5.3.230.0060.02213.18
5.3.220.0070.03113.25
5.3.210.0060.03013.29
5.3.200.0070.02613.29
5.3.190.0090.02713.26
5.3.180.0090.02113.29
5.3.170.0060.02513.29
5.3.160.0060.02913.34
5.3.150.0070.02313.32
5.3.140.0060.02113.27
5.3.130.0030.02313.25
5.3.120.0070.02313.25
5.3.110.0070.02213.22
5.3.100.0080.02113.06
5.3.90.0060.01713.11
5.3.80.0040.02013.09
5.3.70.0080.01813.00
5.3.60.0030.02613.01
5.3.50.0040.03213.00
5.3.40.0070.02912.98
5.3.30.0060.02013.02
5.3.20.0050.02012.96
5.3.10.0060.02912.99
5.3.00.0090.02812.84
5.2.170.0030.04712.22
5.2.160.0030.05712.22
5.2.150.0030.06312.22
5.2.140.0000.05012.22
5.2.130.0000.05712.22
5.2.120.0000.06312.22
5.2.110.0000.06312.22
5.2.100.0070.05712.22
5.2.90.0030.06012.22
5.2.80.0030.05712.22
5.2.70.0030.05712.22
5.2.60.0030.06312.22
5.2.50.0030.05312.22
5.2.40.0030.05712.22
5.2.30.0030.04312.22
5.2.20.0030.06312.22
5.2.10.0070.04012.22
5.2.00.0030.06712.22
5.1.60.0030.04712.22
5.1.50.0000.05712.22
5.1.40.0030.04712.22
5.1.30.0070.05712.22
5.1.20.0100.05012.22
5.1.10.0030.05012.22
5.1.00.0000.04312.22
5.0.50.0030.04712.22
5.0.40.0070.03712.22
5.0.30.0000.06712.22
5.0.20.0070.04012.22
5.0.10.0000.04312.22
5.0.00.0030.06712.22
4.4.90.0000.02712.22
4.4.80.0030.03312.22
4.4.70.0000.03712.22
4.4.60.0000.03712.22
4.4.50.0030.02712.22
4.4.40.0000.04312.22
4.4.30.0030.03312.22
4.4.20.0030.02712.22
4.4.10.0030.03012.22
4.4.00.0000.05712.22
4.3.110.0030.03012.22
4.3.100.0030.03312.22
4.3.90.0030.02012.22
4.3.80.0000.04012.22
4.3.70.0000.03012.22
4.3.60.0030.03012.22
4.3.50.0000.03012.22
4.3.40.0000.05012.22
4.3.30.0000.03012.22
4.3.20.0070.03012.22
4.3.10.0000.03712.22
4.3.00.0000.03312.22

preferences:
47.16 ms | 401 KiB | 5 Q