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; } $result = eval("return ({$input});"); 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.70.0110.01116.75
8.3.60.0070.01116.50
8.3.50.0120.01217.36
8.3.40.0130.01018.75
8.3.30.0040.01818.72
8.3.20.0000.01618.66
8.3.10.0040.00420.52
8.3.00.0130.00719.25
8.2.180.0100.00718.20
8.2.170.0110.00422.96
8.2.160.0100.01020.53
8.2.150.0070.00024.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.36
8.2.110.0030.00621.05
8.2.100.0090.00317.66
8.2.90.0030.00619.30
8.2.80.0000.00919.34
8.2.70.0080.00017.63
8.2.60.0000.00918.04
8.2.50.0040.00418.07
8.2.40.0040.00418.09
8.2.30.0030.00518.01
8.2.20.0040.00417.65
8.2.10.0070.00017.66
8.2.00.0080.00017.62
8.1.280.0100.01025.92
8.1.270.0030.00624.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0070.01022.42
8.1.230.0080.00320.89
8.1.220.0090.00017.75
8.1.210.0040.00420.69
8.1.200.0070.00317.35
8.1.190.0030.00617.50
8.1.180.0090.00318.10
8.1.170.0040.00418.84
8.1.160.0030.00618.82
8.1.150.0030.00518.56
8.1.140.0040.00717.44
8.1.130.0030.00517.83
8.1.120.0040.00317.46
8.1.110.0060.00317.41
8.1.100.0000.00717.52
8.1.90.0080.00017.48
8.1.80.0030.00317.41
8.1.70.0030.00317.34
8.1.60.0030.00517.61
8.1.50.0040.00417.50
8.1.40.0050.00317.49
8.1.30.0020.00517.58
8.1.20.0050.00317.65
8.1.10.0000.00717.57
8.1.00.0070.00017.51
8.0.300.0040.00419.93
8.0.290.0040.00416.63
8.0.280.0000.00718.43
8.0.270.0030.00317.27
8.0.260.0030.00316.70
8.0.250.0080.00017.01
8.0.240.0050.00316.93
8.0.230.0000.00716.97
8.0.220.0040.00416.84
8.0.210.0000.00716.89
8.0.200.0000.00616.97
8.0.190.0000.00716.96
8.0.180.0000.01116.93
8.0.170.0030.00516.91
8.0.160.0050.00216.81
8.0.150.0030.00616.84
8.0.140.0000.00816.75
8.0.130.0080.00013.32
8.0.120.0040.00416.74
8.0.110.0040.00416.93
8.0.100.0080.00016.77
8.0.90.0000.00716.96
8.0.80.0030.01716.96
8.0.70.0070.00016.93
8.0.60.0050.00316.75
8.0.50.0050.00216.71
8.0.30.0090.00916.97
8.0.20.0120.00617.18
8.0.10.0000.00816.86
8.0.00.0130.01016.59
7.4.330.0000.00512.92
7.4.320.0000.00616.46
7.4.300.0040.00416.56
7.4.290.0030.00316.61
7.4.280.0030.00516.41
7.4.270.0040.00416.53
7.4.260.0060.00316.59
7.4.250.0000.00816.60
7.4.240.0000.00716.53
7.4.230.0030.00316.68
7.4.220.0070.01116.45
7.4.210.0100.00716.55
7.4.200.0000.00816.49
7.4.190.0000.00816.41
7.4.160.0100.00616.31
7.4.150.0150.00316.44
7.4.140.0050.01616.42
7.4.130.0110.00816.65
7.4.120.0080.01016.61
7.4.110.0140.00316.56
7.4.100.0120.00816.49
7.4.90.0180.00816.50
7.4.80.0090.00919.39
7.4.70.0030.01316.40
7.4.60.0170.00016.48
7.4.50.0060.00016.61
7.4.40.0050.00716.38
7.4.30.0060.00916.40
7.4.10.0090.00415.25
7.4.00.0080.00815.09
7.3.330.0060.00013.24
7.3.320.0000.00713.23
7.3.310.0070.00016.35
7.3.300.0030.00316.18
7.3.290.0140.00016.44
7.3.280.0100.00616.36
7.3.270.0090.00916.55
7.3.260.0090.00916.33
7.3.250.0080.01116.54
7.3.240.0060.01016.41
7.3.230.0140.00416.51
7.3.210.0100.00716.46
7.3.200.0090.00616.37
7.3.190.0150.00316.53
7.3.180.0050.01116.50
7.3.170.0100.00616.65
7.3.160.0120.00916.57
7.3.130.0070.01114.91
7.3.120.0060.00814.70
7.3.110.0070.01114.93
7.3.100.0050.00914.75
7.3.90.0030.01114.73
7.3.80.0120.00615.17
7.3.70.0040.00815.00
7.3.60.0130.00314.96
7.3.50.0140.00314.72
7.3.40.0040.01114.88
7.3.30.0090.00614.71
7.3.20.0060.01316.84
7.3.10.0040.00916.48
7.3.00.0000.01716.71
7.2.330.0120.00616.70
7.2.320.0030.01316.70
7.2.310.0070.01616.76
7.2.300.0120.00616.56
7.2.290.0090.00916.77
7.2.260.0070.01115.08
7.2.250.0090.00915.29
7.2.240.0030.01014.88
7.2.230.0040.01115.21
7.2.220.0070.00715.17
7.2.210.0040.00815.24
7.2.200.0070.00715.16
7.2.190.0030.01315.19
7.2.180.0070.01114.93
7.2.170.0000.01115.16
7.2.160.0030.01214.95
7.2.150.0090.00317.14
7.2.140.0040.00817.13
7.2.130.0150.00316.98
7.2.120.0070.01116.77
7.2.110.0060.00617.00
7.2.100.0000.01317.11
7.2.90.0090.00616.96
7.2.80.0080.00816.83
7.2.70.0030.01316.68
7.2.60.0060.00616.89
7.2.50.0040.00716.83
7.2.40.0110.00316.56
7.2.30.0100.00317.05
7.2.20.0000.00916.88
7.2.10.0070.01016.54
7.2.00.0070.01117.15
7.1.330.0030.01215.74
7.1.320.0030.01315.45
7.1.310.0090.00315.89
7.1.300.0070.01116.04
7.1.290.0170.00015.61
7.1.280.0100.00715.86
7.1.270.0060.01015.62
7.1.260.0030.00716.03
7.1.250.0040.01215.61
7.1.240.0100.00715.76
7.1.230.0100.00315.99
7.1.220.0030.01015.69
7.1.210.0040.00815.68
7.1.200.0060.00915.62
7.1.190.0050.00915.93
7.1.180.0100.00715.79
7.1.170.0080.00415.69
7.1.160.0090.00015.75
7.1.150.0040.01215.54
7.1.140.0070.00315.94
7.1.130.0090.00915.69
7.1.120.0060.00915.68
7.1.110.0100.00615.74
7.1.100.0030.00615.92
7.1.90.0090.00615.55
7.1.80.0080.00815.77
7.1.70.0100.00316.41
7.1.60.0050.01017.62
7.1.50.0180.00925.21
7.1.40.0080.00415.87
7.1.30.0030.01015.85
7.1.20.0070.00715.84
7.1.10.0060.00315.63
7.1.00.0050.04019.05
7.0.330.0080.00815.45
7.0.320.0040.01115.50
7.0.310.0070.00415.41
7.0.300.0040.00815.13
7.0.290.0000.01515.27
7.0.280.0030.01015.43
7.0.270.0120.00615.35
7.0.260.0040.01115.48
7.0.250.0080.00315.26
7.0.240.0000.00915.35
7.0.230.0100.01015.50
7.0.220.0000.01615.36
7.0.210.0070.00715.48
7.0.200.0040.00416.22
7.0.190.0070.00715.50
7.0.180.0060.00315.39
7.0.170.0060.00615.51
7.0.160.0070.01115.53
7.0.150.0060.00315.56
7.0.140.0070.03918.60
7.0.130.0080.00415.46
7.0.120.0020.04218.69
7.0.110.0000.01215.29
7.0.100.0030.01015.53
7.0.90.0110.00315.54
7.0.80.0060.00615.38
7.0.70.0000.01315.37
7.0.60.0130.04017.51
7.0.50.0050.04916.63
7.0.40.0040.04716.84
7.0.30.0200.04316.83
7.0.20.0200.03316.88
7.0.10.0100.04516.83
7.0.00.0090.03516.87
5.6.400.0030.01214.39
5.6.390.0090.00314.36
5.6.380.0000.01414.53
5.6.370.0070.00714.51
5.6.360.0090.00614.55
5.6.350.0070.00414.77
5.6.340.0040.00714.53
5.6.330.0080.00614.80
5.6.320.0060.00614.31
5.6.310.0000.01214.30
5.6.300.0040.00814.50
5.6.290.0060.00914.60
5.6.280.0110.03717.61
5.6.270.0070.00414.51
5.6.260.0030.01014.52
5.6.250.0090.00614.63
5.6.240.0060.00614.30
5.6.230.0030.00714.52
5.6.220.0070.00714.58
5.6.210.0070.03617.40
5.6.200.0020.04516.28
5.6.190.0100.02217.61
5.6.180.2080.02517.49
5.6.170.0140.03317.50
5.6.160.0100.04117.52
5.6.150.0070.04316.23
5.6.140.0120.03816.26
5.6.130.0080.04016.25
5.6.120.0090.04617.65
5.6.110.0050.02517.74
5.6.100.0080.03617.66
5.6.90.0030.02717.66
5.6.80.0030.04517.41
5.6.70.0110.00414.48
5.6.60.0070.00714.48
5.6.50.0100.00314.25
5.6.40.0040.00714.30
5.6.30.0060.00614.43
5.6.20.0110.00414.68
5.6.10.0000.01314.36
5.6.00.0100.00714.34
5.5.380.0070.00714.36
5.5.370.0060.00614.11
5.5.360.0100.00314.34
5.5.350.0120.02817.33
5.5.340.0090.02016.09
5.5.330.0090.04317.19
5.5.320.0200.04217.37
5.5.310.0180.02717.26
5.5.300.0010.02916.12
5.5.290.0070.04016.12
5.5.280.0150.02917.33
5.5.270.0060.02417.62
5.5.260.0120.03717.54
5.5.250.0040.04617.53
5.5.240.0110.03617.31
5.5.230.0090.00314.14
5.5.220.0050.00514.20
5.5.210.0000.01014.30
5.5.200.0060.00314.39
5.5.190.0030.00914.33
5.5.180.0040.01114.46
5.5.170.0080.00814.36
5.5.160.0000.00914.30
5.5.150.0030.01014.41
5.5.140.0060.00914.06
5.5.130.0070.00314.35
5.5.120.0120.00314.57
5.5.110.0070.00714.53
5.5.100.0000.01014.29
5.5.90.0110.00314.36
5.5.80.0000.01113.95
5.5.70.0030.01014.56
5.5.60.0040.01114.23
5.5.50.0100.00314.42
5.5.40.0060.00614.23
5.5.30.0070.00714.38
5.5.20.0100.00314.39
5.5.10.0030.01214.06
5.5.00.0040.00814.58
5.4.450.0070.03516.00
5.4.440.0070.04415.85
5.4.430.0090.03815.93
5.4.420.0060.02615.93
5.4.410.0000.02815.87
5.4.400.0020.02815.63
5.4.390.0090.02415.77
5.4.380.0070.04215.82
5.4.370.0010.04415.77
5.4.360.0020.02915.71
5.4.350.0080.04115.63
5.4.340.0060.04015.80
5.4.330.0030.00712.46
5.4.320.0020.04315.63
5.4.310.0070.03415.63
5.4.300.0050.02515.62
5.4.290.0050.04015.77
5.4.280.0050.04215.82
5.4.270.0030.04015.62
5.4.260.0060.02415.79
5.4.250.0090.02415.63
5.4.240.0030.03315.71
5.4.230.0070.03215.73
5.4.220.0070.04115.81
5.4.210.0080.01815.77
5.4.200.0020.03015.83
5.4.190.0030.04315.81
5.4.180.0050.02515.68
5.4.170.0050.03015.82
5.4.160.0020.04115.63
5.4.150.0000.03315.74
5.4.140.0050.02014.42
5.4.130.0060.02014.36
5.4.120.0100.03614.41
5.4.110.0060.03114.37
5.4.100.0070.03914.36
5.4.90.0050.03414.40
5.4.80.0050.02514.41
5.4.70.0060.02014.37
5.4.60.0020.02714.39
5.4.50.0080.01814.35
5.4.40.0020.02214.37
5.4.30.0070.01814.37
5.4.20.0020.02714.42
5.4.10.0070.01814.39
5.4.00.0030.02214.20
5.3.290.0100.01713.56
5.3.280.0100.03713.50
5.3.270.0020.03713.51
5.3.260.0050.02913.44
5.3.250.0050.02513.48
5.3.240.0020.03213.50
5.3.230.0070.02613.50
5.3.220.0050.02513.46
5.3.210.0160.01513.46
5.3.200.0050.03313.49
5.3.190.0050.02713.48
5.3.180.0060.03313.50
5.3.170.0030.04013.49
5.3.160.0030.02213.53
5.3.150.0030.02213.49
5.3.140.0040.02213.51
5.3.130.0050.02213.48
5.3.120.0040.02413.48
5.3.110.0050.02113.48
5.3.100.0030.02013.22
5.3.90.0020.02913.29
5.3.80.0010.02113.21
5.3.70.0000.02613.16
5.3.60.0070.01813.21
5.3.50.0060.01713.18
5.3.40.0030.02013.13
5.3.30.0040.02113.18
5.3.20.0020.02213.05
5.3.10.0030.02313.04
5.3.00.0000.02213.04
5.2.170.0000.03011.15
5.2.160.0030.02711.00
5.2.150.0030.02711.14
5.2.140.0000.03011.15
5.2.130.0030.02711.27
5.2.120.0000.03011.09
5.2.110.0030.02711.27
5.2.100.0000.03011.02
5.2.90.0000.03011.05
5.2.80.0100.02711.09
5.2.70.0070.02310.96
5.2.60.0030.03311.00
5.2.50.0030.02711.04
5.2.40.0070.02310.94
5.2.30.0000.03010.87
5.2.20.0000.03710.98
5.2.10.0030.02710.83
5.2.00.0070.02310.77
5.1.60.0000.02310.05
5.1.50.0030.02310.07
5.1.40.0000.0239.95
5.1.30.0030.02710.23
5.1.20.0000.03010.38
5.1.10.0000.02710.10
5.1.00.0030.02310.14
5.0.50.0000.0208.53
5.0.40.0000.0208.33
5.0.30.0000.0338.23
5.0.20.0000.0478.23
5.0.10.0000.0508.23
5.0.00.0000.0708.22
4.4.90.0000.0177.78
4.4.80.0000.0207.78
4.4.70.0000.0177.78
4.4.60.0000.0207.78
4.4.50.0030.0137.78
4.4.40.0000.0307.78
4.4.30.0000.0177.78
4.4.20.0030.0137.78
4.4.10.0000.0177.78
4.4.00.0000.0237.78
4.3.110.0000.0137.78
4.3.100.0000.0337.78
4.3.90.0100.0177.78
4.3.80.0030.0377.78
4.3.70.0030.0207.78
4.3.60.0070.0307.78
4.3.50.0030.0337.78
4.3.40.0000.0577.78
4.3.30.0000.0407.78
4.3.20.0030.0377.78
4.3.10.0000.0377.78
4.3.00.0000.0377.78

preferences:
42.21 ms | 401 KiB | 5 Q