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.01118.55
8.3.50.0080.00821.21
8.3.40.0110.00418.78
8.3.30.0090.00618.86
8.3.20.0030.00518.95
8.3.10.0060.00321.17
8.3.00.0070.00021.87
8.2.180.0100.01016.63
8.2.170.0180.00422.96
8.2.160.0070.00722.26
8.2.150.0000.00824.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00020.95
8.2.110.0060.00319.45
8.2.100.0080.00418.03
8.2.90.0040.00419.23
8.2.80.0030.00517.97
8.2.70.0080.00317.75
8.2.60.0080.00018.16
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0050.00319.45
8.2.20.0040.00417.73
8.2.10.0000.00817.73
8.2.00.0070.00017.81
8.1.280.0090.01325.92
8.1.270.0040.00423.99
8.1.260.0120.00626.35
8.1.250.0040.00428.09
8.1.240.0040.00422.28
8.1.230.0120.00022.63
8.1.220.0050.00318.77
8.1.210.0040.00418.95
8.1.200.0060.00317.23
8.1.190.0070.00017.41
8.1.180.0040.00418.10
8.1.170.0030.00618.71
8.1.160.0070.00318.96
8.1.150.0000.00718.64
8.1.140.0040.00417.32
8.1.130.0030.00317.77
8.1.120.0020.00517.35
8.1.110.0040.00417.48
8.1.100.0040.00417.36
8.1.90.0030.00417.50
8.1.80.0000.00817.38
8.1.70.0030.00317.46
8.1.60.0080.00017.47
8.1.50.0000.00717.45
8.1.40.0000.00917.52
8.1.30.0030.00517.65
8.1.20.0000.00817.52
8.1.10.0040.00417.60
8.1.00.0000.00917.45
8.0.300.0000.00819.91
8.0.290.0070.00017.16
8.0.280.0070.00018.39
8.0.270.0070.00016.91
8.0.260.0040.00416.70
8.0.250.0000.00716.94
8.0.240.0030.00916.85
8.0.230.0050.00316.86
8.0.220.0070.00016.73
8.0.210.0000.01016.87
8.0.200.0030.00316.95
8.0.190.0030.00317.00
8.0.180.0040.00416.93
8.0.170.0040.00416.79
8.0.160.0070.00016.87
8.0.150.0070.00016.84
8.0.140.0040.00416.86
8.0.130.0000.00513.27
8.0.120.0040.00416.92
8.0.110.0040.00416.69
8.0.100.0070.00016.76
8.0.90.0080.00016.91
8.0.80.0130.01016.84
8.0.70.0040.00416.89
8.0.60.0040.00416.80
8.0.50.0040.00416.92
8.0.30.0110.00817.22
8.0.20.0090.01217.40
8.0.10.0000.00717.13
8.0.00.0070.01216.72
7.4.330.0050.00016.79
7.4.320.0030.00316.65
7.4.300.0030.00316.52
7.4.290.0000.00816.46
7.4.280.0040.00616.36
7.4.270.0030.00316.52
7.4.260.0030.00313.30
7.4.250.0030.00516.37
7.4.240.0040.00416.49
7.4.230.0030.00516.33
7.4.220.0080.00716.64
7.4.210.0120.00516.57
7.4.200.0050.00216.64
7.4.190.0000.00716.46
7.4.160.0110.01116.40
7.4.150.0130.00617.40
7.4.140.0100.01117.86
7.4.130.0100.00716.58
7.4.120.0100.01016.61
7.4.110.0100.00716.64
7.4.100.0070.01116.49
7.4.90.0100.00716.44
7.4.80.0160.00019.39
7.4.70.0080.00816.40
7.4.60.0100.00616.55
7.4.50.0040.00416.63
7.4.40.0030.01322.77
7.4.30.0030.01316.41
7.4.00.0090.00614.68
7.3.330.0000.00513.22
7.3.320.0060.00013.13
7.3.310.0030.00516.30
7.3.300.0060.00316.36
7.3.290.0150.00016.30
7.3.280.0100.00616.31
7.3.270.0060.01417.40
7.3.260.0130.00818.24
7.3.250.0090.01016.33
7.3.240.0080.00816.43
7.3.230.0120.00916.48
7.3.210.0130.00316.29
7.3.200.0080.00919.39
7.3.190.0070.01016.48
7.3.180.0030.01316.49
7.3.170.0090.00616.52
7.3.160.0080.00816.47
7.3.120.0030.01415.03
7.3.10.0140.00416.45
7.3.00.0070.00716.77
7.2.330.0060.01316.81
7.2.320.0170.00616.78
7.2.310.0170.00716.80
7.2.300.0100.01216.60
7.2.290.0030.01316.37
7.2.130.0070.01117.03
7.2.120.0110.00616.83
7.2.110.0040.00917.04
7.2.100.0100.00616.68
7.2.90.0040.01116.83
7.2.80.0060.00317.03
7.2.70.0070.01416.96
7.2.60.0060.00917.03
7.2.50.0100.01016.90
7.2.40.0030.01316.75
7.2.30.0080.00816.74
7.2.20.0090.00616.92
7.2.10.0060.00616.68
7.2.00.0060.01017.19
7.1.250.0040.01116.07
7.1.200.0040.01215.88
7.1.110.0680.01316.43
7.1.100.0540.01016.34
7.1.90.0480.01015.80
7.1.80.0450.00715.64
7.1.70.0200.00616.27
7.1.60.0200.01125.29
7.1.50.0310.00824.89
7.1.40.0260.01324.70
7.1.30.0340.00724.85
7.1.20.0200.01324.70
7.1.10.0160.00815.70
7.1.00.0150.01215.77
7.0.250.0730.01016.06
7.0.240.0600.01015.76
7.0.230.0720.01115.62
7.0.220.0430.01015.48
7.0.210.0310.00914.64
7.0.200.0230.00615.80
7.0.190.0200.00515.83
7.0.180.0110.01115.42
7.0.170.0230.00815.43
7.0.160.0210.01215.42
7.0.150.0160.00615.43
7.0.140.0160.00715.60
7.0.130.0140.00815.74
7.0.120.0100.00915.63
7.0.110.0190.00815.37
7.0.100.1460.00715.50
7.0.90.0200.00415.60
7.0.80.0220.00515.40
7.0.70.0130.00515.51
7.0.60.0180.00715.32
7.0.50.0060.01315.44
7.0.40.0160.00514.93
7.0.30.0150.01114.86
7.0.20.0180.00314.89
7.0.10.0130.00714.98
7.0.00.0110.00814.96
5.6.300.0130.05120.80
5.6.290.0050.05120.93
5.6.280.0150.06020.76
5.6.270.0190.05020.79
5.6.260.0140.07520.88
5.6.250.0030.05520.85
5.6.240.0070.05420.79
5.6.230.0050.05320.81
5.6.220.0120.04920.79
5.6.210.0070.06220.98
5.6.200.0070.05420.72
5.6.190.0070.05320.79
5.6.180.0090.06120.88
5.6.170.0140.05120.79
5.6.160.0070.05020.84
5.6.150.0060.05120.85
5.6.140.0060.05720.70
5.6.130.0100.04720.75
5.6.120.0070.04920.87
5.6.110.0100.04920.86
5.6.100.0050.07820.92
5.6.90.0110.06220.75
5.6.80.0050.05320.11
5.6.70.0030.05320.18
5.6.60.0120.04220.21
5.6.50.0070.04420.22
5.6.40.0050.04620.16
5.6.30.0060.05020.04
5.6.20.0080.06020.23
5.6.10.0080.04320.06
5.6.00.0110.05220.15
5.5.380.0100.05217.48
5.5.370.0080.06117.50
5.5.360.0070.06317.55
5.5.350.0050.04717.50
5.5.340.0030.05118.00
5.5.330.0090.04418.09
5.5.320.0090.06117.94
5.5.310.0070.06117.98
5.5.300.0080.06318.05
5.5.290.0040.05517.85
5.5.280.0050.05718.00
5.5.270.0070.05117.99
5.5.260.0140.06317.88
5.5.250.0130.05117.69
5.5.240.0120.05217.42
5.5.230.0020.05417.24
5.5.220.0070.04417.41
5.5.210.0070.04417.21
5.5.200.0050.04417.26
5.5.190.0070.04817.27
5.5.180.0080.05617.16
5.5.160.0050.04717.31
5.5.150.0110.04017.29
5.5.140.0060.06517.43
5.5.130.0100.04117.22
5.5.120.0060.04517.23
5.5.110.0070.05917.22
5.5.100.0050.05217.31
5.5.90.0070.04417.19
5.5.80.0100.04117.25
5.5.70.0070.06517.14
5.5.60.0050.04617.13
5.5.50.0050.04717.06
5.5.40.0080.04617.21
5.5.30.0130.04717.24
5.5.20.0180.05817.14
5.5.10.0110.04317.11
5.5.00.0070.04917.08
5.4.450.0090.04819.29
5.4.440.0180.05019.28
5.4.430.0080.04519.27
5.4.420.0100.06019.25
5.4.410.0070.04919.10
5.4.400.0070.04819.13
5.4.390.0100.04419.04
5.4.380.0080.04318.99
5.4.370.0070.04319.02
5.4.360.0050.04718.86
5.4.350.0080.04718.91
5.4.340.0050.04819.04
5.4.320.0050.05019.01
5.4.310.0030.04819.02
5.4.300.0110.04219.13
5.4.290.0040.04819.11
5.4.280.0090.04318.83
5.4.270.0110.04619.05
5.4.260.0070.05318.88
5.4.250.0070.04318.93
5.4.240.0120.06018.91
5.4.230.0050.05118.97
5.4.220.0120.05618.96
5.4.210.0080.04818.86
5.4.200.0070.05118.95
5.4.190.0080.05419.05
5.4.180.0110.04419.00
5.4.170.0050.04819.14
5.4.160.0080.04318.94
5.4.150.0100.04718.89
5.4.140.0080.05616.34
5.4.130.0130.04116.54
5.4.120.0150.04616.54
5.4.110.0090.04316.58
5.4.100.0100.04016.46
5.4.90.0070.04316.62
5.4.80.0030.04716.50
5.4.70.0050.04616.41
5.4.60.0050.04416.50
5.4.50.0050.04616.40
5.4.40.0050.04716.56
5.4.30.0070.04016.42
5.4.20.0090.03916.55
5.4.10.0070.04316.50
5.4.00.0080.03915.81
5.3.290.0050.04815.03
5.3.280.0030.05715.01
5.3.270.0140.03815.04
5.3.260.0110.05615.03
5.3.250.0070.05015.03
5.3.240.0110.04215.04
5.3.230.0100.04214.99
5.3.220.0110.04514.98
5.3.210.0050.05014.90
5.3.200.0100.04115.02
5.3.190.0100.04214.93
5.3.180.0050.04615.01
5.3.170.0020.04814.96
5.3.160.0080.04414.93
5.3.150.0150.03814.97
5.3.140.0060.04415.00
5.3.130.0070.04815.00
5.3.120.0020.04815.00
5.3.110.0150.04914.92
5.3.100.0090.04114.75
5.3.90.0050.04414.63
5.3.80.0060.04514.61
5.3.70.0070.04114.71
5.3.60.0030.04514.73
5.3.50.0140.03614.72
5.3.40.0050.04914.71
5.3.30.0050.04314.64
5.3.20.0100.04814.54
5.3.10.0050.04114.43
5.3.00.0050.04714.45
5.2.170.0060.03413.32
5.2.160.0090.03113.33
5.2.150.0030.03613.34
5.2.140.0050.03613.33
5.2.130.0040.03713.32
5.2.120.0030.03613.28
5.2.110.0050.03513.28
5.2.100.0100.03113.23
5.2.90.0050.03413.20
5.2.80.0050.03613.16
5.2.70.0070.03913.28
5.2.60.0090.03213.25
5.2.50.0050.04213.19
5.2.40.0070.03513.18
5.2.30.0020.03913.21
5.2.20.0030.03513.10
5.2.10.0030.03413.11
5.2.00.0050.03413.04
5.1.60.0080.02712.80
5.1.50.0080.04012.67
5.1.40.0070.02712.79
5.1.30.0020.03412.97
5.1.20.0050.03912.92
5.1.10.0070.02812.71
5.1.00.0030.03012.68
5.0.50.0020.02712.05
5.0.40.0030.02512.04
5.0.30.0070.03812.04
5.0.20.0050.02212.04
5.0.10.0040.02312.04
5.0.00.0020.04612.04
4.4.90.0050.02512.04
4.4.80.0050.02112.04
4.4.70.0020.02812.04
4.4.60.0030.01812.04
4.4.50.0040.01812.04
4.4.40.0050.04312.04
4.4.30.0050.02312.04
4.4.20.0020.02412.04
4.4.10.0060.01712.04
4.4.00.0030.02912.04
4.3.110.0050.02412.04
4.3.100.0030.02212.04
4.3.90.0010.01912.04
4.3.80.0030.02712.04
4.3.70.0030.02212.04
4.3.60.0010.02012.04
4.3.50.0060.01712.04
4.3.40.0030.03412.04
4.3.30.0020.02012.04
4.3.20.0010.01912.04
4.3.10.0030.01712.04
4.3.00.0040.01712.04

preferences:
60.41 ms | 400 KiB | 5 Q