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.0140.00716.62
8.3.50.0140.00516.57
8.3.40.0130.00319.04
8.3.30.0040.01118.92
8.3.20.0040.00418.71
8.3.10.0030.00620.61
8.3.00.0050.00319.51
8.2.180.0190.00318.54
8.2.170.0090.00622.96
8.2.160.0140.00021.02
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0090.00026.16
8.2.120.0080.00021.05
8.2.110.0070.00422.24
8.2.100.0060.00617.91
8.2.90.0080.00019.35
8.2.80.0040.00417.97
8.2.70.0080.00017.63
8.2.60.0040.00418.04
8.2.50.0060.00318.07
8.2.40.0070.00018.18
8.2.30.0040.00418.17
8.2.20.0000.00717.66
8.2.10.0000.00717.68
8.2.00.0020.00717.86
8.1.280.0090.00625.92
8.1.270.0070.00024.66
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00322.19
8.1.230.0080.00317.51
8.1.220.0000.00917.74
8.1.210.0030.00618.77
8.1.200.0090.00017.35
8.1.190.0080.00017.66
8.1.180.0030.00518.10
8.1.170.0080.00018.96
8.1.160.0050.00318.96
8.1.150.0000.00818.61
8.1.140.0020.00517.46
8.1.130.0000.00717.84
8.1.120.0000.00717.44
8.1.110.0000.00817.47
8.1.100.0050.00317.45
8.1.90.0000.00717.44
8.1.80.0000.00717.45
8.1.70.0000.00917.44
8.1.60.0060.00317.58
8.1.50.0030.00517.49
8.1.40.0040.00417.42
8.1.30.0080.00017.56
8.1.20.0040.00417.68
8.1.10.0040.00417.61
8.1.00.0030.00517.52
8.0.300.0000.00718.77
8.0.290.0040.00416.88
8.0.280.0000.00918.47
8.0.270.0040.00417.27
8.0.260.0000.00616.77
8.0.250.0060.00317.06
8.0.240.0000.00716.90
8.0.230.0000.00816.91
8.0.220.0070.00016.89
8.0.210.0030.00316.91
8.0.200.0000.00617.02
8.0.190.0000.00717.04
8.0.180.0050.00216.91
8.0.170.0000.00916.98
8.0.160.0000.00816.93
8.0.150.0040.00416.84
8.0.140.0030.00716.94
8.0.130.0000.00513.48
8.0.120.0060.00316.88
8.0.110.0000.00816.92
8.0.100.0030.00516.86
8.0.90.0040.00417.00
8.0.80.0060.00916.96
8.0.70.0040.00417.00
8.0.60.0040.00416.86
8.0.50.0000.00816.75
8.0.30.0110.00917.29
8.0.20.0150.00817.13
8.0.10.0040.00416.90
8.0.00.0140.00416.90
7.4.330.0020.00213.19
7.4.320.0030.00316.53
7.4.300.0030.00616.61
7.4.290.0030.00316.65
7.4.280.0000.00716.61
7.4.270.0080.00016.53
7.4.260.0050.00013.44
7.4.250.0000.00816.48
7.4.240.0040.00416.62
7.4.230.0000.00816.41
7.4.220.0130.00816.43
7.4.210.0060.01016.62
7.4.200.0030.00316.43
7.4.190.0030.00316.38
7.4.160.0060.00916.64
7.4.150.0140.00416.51
7.4.140.0050.01416.51
7.4.130.0100.01016.54
7.4.120.0040.01416.60
7.4.110.0150.00316.54
7.4.100.0100.00716.43
7.4.90.0060.01216.50
7.4.80.0150.00919.39
7.4.70.0170.00016.65
7.4.60.0090.00916.52
7.4.50.0070.00216.34
7.4.40.0030.01016.46
7.4.30.0080.00816.60
7.4.00.0100.00715.00
7.3.330.0000.00613.22
7.3.320.0000.00513.24
7.3.310.0000.00716.23
7.3.300.0030.00316.31
7.3.290.0130.00316.37
7.3.280.0070.01016.39
7.3.270.0100.00716.59
7.3.260.0110.00816.56
7.3.250.0140.00716.41
7.3.240.0140.00916.38
7.3.230.0080.00916.58
7.3.210.0070.01016.55
7.3.200.0040.01716.40
7.3.190.0060.00916.33
7.3.180.0060.01716.64
7.3.170.0000.01516.39
7.3.160.0090.00616.37
7.3.120.0080.00814.92
7.3.110.0050.00914.93
7.3.100.0080.00814.80
7.3.90.0050.00914.88
7.3.80.0050.00715.05
7.3.70.0030.01014.90
7.3.60.0070.00414.86
7.3.50.0060.00814.80
7.3.40.0030.00714.93
7.3.30.0080.00714.96
7.3.20.0050.00616.59
7.3.10.0110.00516.51
7.3.00.0040.00716.55
7.2.330.0070.01316.77
7.2.320.0130.00916.69
7.2.310.0120.01116.52
7.2.300.0100.00716.73
7.2.290.0060.01016.63
7.2.250.0100.01015.14
7.2.240.0080.00815.08
7.2.230.0030.01215.24
7.2.220.0070.00815.03
7.2.210.0050.00815.19
7.2.200.0080.00815.10
7.2.190.0100.00615.07
7.2.180.0110.00515.16
7.2.170.0050.01215.16
7.2.160.0000.01515.17
7.2.150.0040.01117.19
7.2.140.0070.01016.98
7.2.130.0080.01016.78
7.2.120.0130.00516.74
7.2.110.0060.01116.78
7.2.100.0070.00816.85
7.2.90.0110.00416.79
7.2.80.0120.00916.74
7.2.70.0090.00916.90
7.2.60.0090.00816.88
7.2.50.0090.00916.90
7.2.40.0070.01016.85
7.2.30.0060.00816.64
7.2.20.0090.00816.88
7.2.10.0060.00816.70
7.2.00.0050.01017.43
7.1.330.0050.00915.67
7.1.320.0070.00715.83
7.1.310.0060.00515.76
7.1.300.0060.00615.69
7.1.290.0060.00615.80
7.1.280.0090.00415.83
7.1.270.0030.01015.62
7.1.260.0010.00815.87
7.1.250.0040.00815.67
7.1.240.0000.01115.61
7.1.230.0000.01315.93
7.1.220.0070.00715.68
7.1.210.0070.01015.98
7.1.200.0130.00515.99
7.1.190.0040.01116.06
7.1.180.0070.00315.89
7.1.170.0100.00315.69
7.1.160.0090.00615.77
7.1.150.0000.00915.90
7.1.140.0060.00916.00
7.1.130.0060.00915.84
7.1.120.0090.00315.78
7.1.110.0060.00915.82
7.1.100.0040.01116.96
7.1.90.0090.00615.73
7.1.80.0000.01015.73
7.1.70.0040.00716.51
7.1.60.0090.01117.71
7.1.50.0080.00916.53
7.1.40.0000.01615.78
7.1.30.0070.00715.70
7.1.20.0070.00715.95
7.1.10.0090.00316.06
7.1.00.0060.03619.06
7.0.330.0060.00615.50
7.0.320.0030.01115.48
7.0.310.0060.00315.48
7.0.300.0000.01115.63
7.0.290.0040.00715.48
7.0.280.0090.00615.20
7.0.270.0090.00615.22
7.0.260.0030.00715.54
7.0.250.0120.00615.45
7.0.240.0120.00315.44
7.0.230.0090.00315.64
7.0.220.0070.00715.52
7.0.210.0000.01315.68
7.0.200.0060.00215.98
7.0.190.0060.00615.17
7.0.180.0000.01215.53
7.0.170.0030.01015.52
7.0.160.0030.01015.48
7.0.150.0060.00915.54
7.0.140.0090.03918.92
7.0.130.0030.01015.59
7.0.120.0050.03418.81
7.0.110.0100.00315.53
7.0.100.0130.00315.70
7.0.90.0120.00415.31
7.0.80.0040.00715.21
7.0.70.0060.00615.15
7.0.60.0050.04317.54
7.0.50.0070.03916.85
7.0.40.0050.02516.87
7.0.30.0150.04016.90
7.0.20.0210.03816.86
7.0.10.0070.04716.78
7.0.00.0050.02516.93
5.6.400.0040.01114.36
5.6.390.0000.01414.57
5.6.380.0030.01214.42
5.6.370.0080.00814.61
5.6.360.0070.00414.51
5.6.350.0040.01114.43
5.6.340.0060.00614.72
5.6.330.0030.00914.42
5.6.320.0030.00614.81
5.6.310.0000.01414.16
5.6.300.0030.01714.38
5.6.290.0070.01014.35
5.6.280.0110.03517.60
5.6.270.0040.00414.56
5.6.260.0040.00714.43
5.6.250.0000.01114.24
5.6.240.0040.01114.43
5.6.230.0070.01014.44
5.6.220.0000.01014.59
5.6.210.0080.03717.41
5.6.200.0050.02516.44
5.6.190.0070.04417.60
5.6.180.0280.04217.46
5.6.170.0200.03817.40
5.6.160.0070.03917.37
5.6.150.0030.04916.39
5.6.140.0070.02016.27
5.6.130.0060.04616.36
5.6.120.0060.02917.79
5.6.110.0090.04117.69
5.6.100.0090.02017.63
5.6.90.0050.03917.67
5.6.80.0110.04017.43
5.6.70.0060.00914.36
5.6.60.0000.01614.43
5.6.50.0060.00914.58
5.6.40.0110.00314.71
5.6.30.0000.01014.36
5.6.20.0030.01014.39
5.6.10.0060.00914.64
5.6.00.0030.00614.13
5.5.380.0150.00014.18
5.5.370.0030.00914.05
5.5.360.0040.01214.28
5.5.350.0100.04517.49
5.5.340.0040.03416.04
5.5.330.0050.03017.44
5.5.320.0150.04217.38
5.5.310.0110.02317.10
5.5.300.0030.04916.19
5.5.290.0050.04416.35
5.5.280.0130.03317.71
5.5.270.0070.03717.52
5.5.260.0060.03817.78
5.5.250.0080.03817.49
5.5.240.0070.04117.16
5.5.230.0030.00714.35
5.5.220.0030.01114.17
5.5.210.0060.00614.44
5.5.200.0000.01114.50
5.5.190.0000.01514.50
5.5.180.0060.00914.57
5.5.170.0070.00713.99
5.5.160.0050.00514.59
5.5.150.0040.00714.14
5.5.140.0030.01013.91
5.5.130.0070.01014.16
5.5.120.0110.00714.39
5.5.110.0060.00314.03
5.5.100.0110.00014.63
5.5.90.0000.01213.85
5.5.80.0060.00914.28
5.5.70.0030.01014.60
5.5.60.0050.00614.43
5.5.50.0030.00914.34
5.5.40.0060.00914.40
5.5.30.0030.01014.38
5.5.20.0080.00014.19
5.5.10.0030.01014.45
5.5.00.0070.00314.11
5.4.450.0000.03415.34
5.4.440.0060.02315.21
5.4.430.0100.03715.41
5.4.420.0000.04615.39
5.4.410.0050.02515.28
5.4.400.0140.03015.00
5.4.390.0030.03815.24
5.4.380.0030.03915.15
5.4.370.0040.03415.19
5.4.360.0080.03715.12
5.4.350.0120.03115.05
5.4.340.0060.03115.04
5.4.330.0040.00411.34
5.4.320.0070.02815.03
5.4.310.0070.04015.14
5.4.300.0060.02815.03
5.4.290.0030.02814.90
5.4.280.0150.03215.21
5.4.270.0030.03415.11
5.4.260.0050.02415.15
5.4.250.0040.02814.73
5.4.240.0110.02014.87
5.4.230.0070.03515.14
5.4.220.0020.02514.85
5.4.210.0040.02215.13
5.4.200.0050.02015.18
5.4.190.0040.03415.18
5.4.180.0020.02215.01
5.4.170.0030.02915.04
5.4.160.0100.03714.87
5.4.150.0050.02415.06
5.4.140.0050.02213.60
5.4.130.0030.02413.74
5.4.120.0030.03013.92
5.4.110.0030.02813.72
5.4.100.0030.03213.66
5.4.90.0090.03713.89
5.4.80.0070.03213.83
5.4.70.0080.03813.81
5.4.60.0030.04313.90
5.4.50.0030.04013.55
5.4.40.0020.03813.87
5.4.30.0040.04013.88
5.4.20.0050.03213.81
5.4.10.0050.03713.68
5.4.00.0030.04013.43
5.3.290.0040.02412.65
5.3.280.0050.02312.49
5.3.270.0040.04112.57
5.3.260.0080.01812.64
5.3.250.0040.02212.60
5.3.240.0060.02412.55
5.3.230.0060.02312.56
5.3.220.0010.02812.57
5.3.210.0070.02012.53
5.3.200.0050.02212.51
5.3.190.0030.02612.55
5.3.180.0000.02412.63
5.3.170.0020.03512.64
5.3.160.0000.03112.59
5.3.150.0040.03912.64
5.3.140.0080.03412.55
5.3.130.0070.04012.58
5.3.120.0100.03212.45
5.3.110.0020.02812.56
5.3.100.0060.03712.28
5.3.90.0030.02612.33
5.3.80.0090.03512.26
5.3.70.0020.02812.27
5.3.60.0100.03712.27
5.3.50.0000.03012.24
5.3.40.0100.03512.25
5.3.30.0100.03512.21
5.3.20.0000.02612.11
5.3.10.0070.03512.16
5.3.00.0080.03312.08
5.2.170.0070.06311.09
5.2.160.0030.07011.32
5.2.150.0000.05011.10
5.2.140.0030.05311.16
5.2.130.0200.05311.20
5.2.120.0000.04011.00
5.2.110.0070.04010.97
5.2.100.0100.03311.09
5.2.90.0000.04011.09
5.2.80.0000.05711.09
5.2.70.0030.04311.28
5.2.60.0000.05010.97
5.2.50.0070.06310.98
5.2.40.0030.05310.95
5.2.30.0030.04310.97
5.2.20.0000.04310.87
5.2.10.0070.06311.04
5.2.00.0030.05010.78
5.1.60.0030.05310.04
5.1.50.0130.05010.01
5.1.40.0070.02710.05
5.1.30.0070.05310.26
5.1.20.0100.05310.29
5.1.10.0070.03710.25
5.1.00.0130.04710.09
5.0.50.0030.0439.36
5.0.40.0000.0439.36
5.0.30.0030.0379.36
5.0.20.0100.0339.36
5.0.10.0030.0209.36
5.0.00.0030.0309.36
4.4.90.0070.0309.36
4.4.80.0000.0409.36
4.4.70.0000.0379.36
4.4.60.0070.0279.36
4.4.50.0070.0339.36
4.4.40.0070.0379.36
4.4.30.0000.0339.36
4.4.20.0000.0379.36
4.4.10.0000.0209.36
4.4.00.0000.0439.36
4.3.110.0030.0239.36
4.3.100.0070.0339.36
4.3.90.0030.0209.36
4.3.80.0030.0279.36
4.3.70.0000.0139.36
4.3.60.0000.0179.36
4.3.50.0000.0179.36
4.3.40.0000.0239.36
4.3.30.0000.0179.36
4.3.20.0000.0179.36
4.3.10.0030.0139.36
4.3.00.0000.0139.36

preferences:
36.81 ms | 401 KiB | 5 Q