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; print "\n symbol: " . $expr; continue; } list($id, $text) = $token; if(in_array($id, array(T_DNUMBER, T_LNUMBER))){ $expr .= $text; print "\n number: " . $expr; } } 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.0170.00318.30
8.3.50.0120.00817.45
8.3.40.0150.00018.89
8.3.30.0140.00318.84
8.3.20.0110.00718.90
8.3.10.0040.00420.38
8.3.00.0060.00317.50
8.2.180.0120.00316.75
8.2.170.0150.00322.96
8.2.160.0130.00020.35
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.64
8.2.110.0100.00020.84
8.2.100.0080.00317.72
8.2.90.0000.00919.34
8.2.80.0110.00017.97
8.2.70.0080.00417.50
8.2.60.0000.00817.80
8.2.50.0060.00319.23
8.2.40.0050.00319.65
8.2.30.0070.00018.13
8.2.20.0050.00317.61
8.2.10.0030.00517.77
8.2.00.0040.00417.82
8.1.280.0140.00425.92
8.1.270.0070.00024.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0100.00022.59
8.1.230.0090.00320.96
8.1.220.0080.00017.74
8.1.210.0030.00618.90
8.1.200.0000.00917.35
8.1.190.0090.00017.41
8.1.180.0040.00418.10
8.1.170.0000.00918.76
8.1.160.0000.00719.03
8.1.150.0040.00418.65
8.1.140.0030.00617.53
8.1.130.0000.00717.71
8.1.120.0040.00417.43
8.1.110.0040.00417.46
8.1.100.0070.00017.51
8.1.90.0040.00317.49
8.1.80.0040.00317.36
8.1.70.0030.00317.37
8.1.60.0040.00417.59
8.1.50.0040.00417.47
8.1.40.0020.00517.58
8.1.30.0040.00417.59
8.1.20.0040.00417.50
8.1.10.0040.00417.45
8.1.00.0040.00417.47
8.0.300.0060.00319.87
8.0.290.0040.00416.75
8.0.280.0040.00418.46
8.0.270.0090.00017.32
8.0.260.0030.00616.84
8.0.250.0020.00516.84
8.0.240.0070.00016.85
8.0.230.0030.00316.97
8.0.220.0030.00316.77
8.0.210.0000.00716.84
8.0.200.0030.00317.01
8.0.190.0000.00716.96
8.0.180.0070.00016.92
8.0.170.0000.00916.95
8.0.160.0070.00016.87
8.0.150.0040.00416.88
8.0.140.0000.00716.92
8.0.130.0050.00013.30
8.0.120.0000.00716.88
8.0.110.0050.00216.82
8.0.100.0030.00516.96
8.0.90.0040.00416.80
8.0.80.0070.00716.89
8.0.70.0050.00316.90
8.0.60.0000.00916.79
8.0.50.0040.00416.80
8.0.30.0090.00917.09
8.0.20.0110.01017.12
8.0.10.0050.00216.97
8.0.00.0090.00916.71
7.4.330.0020.00214.69
7.4.320.0030.00316.49
7.4.300.0030.00316.59
7.4.290.0000.00716.54
7.4.280.0000.01116.62
7.4.270.0050.00216.53
7.4.260.0000.00813.21
7.4.250.0000.00816.36
7.4.240.0070.00016.56
7.4.230.0050.00216.28
7.4.220.0130.00316.55
7.4.210.0080.00916.51
7.4.200.0000.00716.59
7.4.190.0040.00416.76
7.4.160.0080.00816.62
7.4.150.0060.01217.07
7.4.140.0080.01417.18
7.4.130.0110.00616.57
7.4.120.0110.00616.43
7.4.110.0090.00916.36
7.4.100.0070.01116.68
7.4.90.0090.00916.45
7.4.80.0000.01918.80
7.4.70.0120.00916.43
7.4.60.0130.01016.65
7.4.50.0000.00523.42
7.4.40.0060.00621.69
7.4.30.0080.00816.50
7.4.00.0040.01215.16
7.3.330.0000.00613.20
7.3.320.0050.00013.19
7.3.310.0040.00416.33
7.3.300.0030.00416.37
7.3.290.0170.00016.46
7.3.280.0090.00716.37
7.3.270.0100.01017.07
7.3.260.0140.01018.24
7.3.250.0110.00816.40
7.3.240.0140.00416.30
7.3.230.0040.01416.61
7.3.210.0060.01016.59
7.3.200.0180.00019.39
7.3.190.0060.01816.31
7.3.180.0110.00716.57
7.3.170.0110.00416.59
7.3.160.0140.00016.57
7.3.120.0060.00914.74
7.3.00.0070.00416.40
7.2.330.0190.00016.56
7.2.320.0080.00816.51
7.2.310.0090.00916.50
7.2.300.0070.01116.64
7.2.290.0130.00316.46
7.2.130.0080.00416.71
7.2.120.0040.01116.77
7.2.110.0030.00617.00
7.2.100.0060.00616.55
7.2.90.0080.00416.89
7.2.80.0100.00716.70
7.2.70.0090.00017.21
7.2.60.0000.01416.84
7.2.50.0040.00816.89
7.2.40.0030.01017.07
7.2.30.0040.00816.79
7.2.20.0000.00816.90
7.2.10.0080.00016.79
7.2.00.0060.00618.19
7.1.250.0070.00315.52
7.1.240.0040.00415.85
7.1.230.0070.00415.97
7.1.220.0070.00715.70
7.1.210.0080.00415.57
7.1.200.0040.00615.78
7.1.190.0090.00615.70
7.1.180.0080.00515.75
7.1.170.0040.00715.86
7.1.160.0100.00315.96
7.1.150.0030.01115.46
7.1.140.0000.00915.85
7.1.130.0060.00315.74
7.1.120.0110.00015.85
7.1.110.0000.01415.96
7.1.100.0060.00716.89
7.1.90.0030.00715.77
7.1.80.0000.01115.80
7.1.70.0030.01116.61
7.1.60.0080.01017.59
7.1.50.0090.00916.43
7.1.40.0000.00815.86
7.1.30.0060.00915.80
7.1.20.0060.00615.48
7.1.10.0030.00815.73
7.1.00.0030.04319.07
7.0.330.0000.00815.25
7.0.320.0070.00715.11
7.0.310.0060.00315.29
7.0.300.0090.00015.21
7.0.290.0030.01015.20
7.0.280.0040.00715.25
7.0.270.0060.00315.25
7.0.260.0030.00915.28
7.0.250.0060.00315.46
7.0.240.0030.01015.52
7.0.230.0030.00715.18
7.0.220.0030.00915.55
7.0.210.0070.00315.46
7.0.200.0060.00416.10
7.0.190.0070.00715.45
7.0.180.0000.01015.45
7.0.170.0030.00515.35
7.0.160.0040.00715.15
7.0.150.0080.00315.48
7.0.140.0020.04218.63
7.0.130.0070.00415.52
7.0.120.0020.02318.58
7.0.110.0080.03717.67
7.0.100.0030.02517.54
7.0.90.0030.03817.61
7.0.80.0070.02017.58
7.0.70.0080.01717.59
7.0.60.0090.02317.68
7.0.50.0070.03817.71
7.0.40.0050.02216.57
7.0.30.0060.02116.57
7.0.20.0030.02716.47
7.0.10.0070.03016.64
7.0.00.0050.03516.59
5.6.380.0030.00714.27
5.6.370.0030.01014.25
5.6.360.0030.00714.33
5.6.350.0030.00614.28
5.6.340.0030.01314.64
5.6.330.0070.00314.58
5.6.320.0000.01014.34
5.6.310.0060.00714.30
5.6.300.0030.00614.77
5.6.290.0000.01014.29
5.6.280.0020.04317.76
5.6.270.0080.00614.18
5.6.260.0030.03017.57
5.6.250.0080.02217.53
5.6.240.0050.02217.43
5.6.230.0090.01917.34
5.6.220.0060.02217.44
5.6.210.0050.03717.45
5.6.200.0060.04517.50
5.6.190.0020.02417.73
5.6.180.0060.02817.56
5.6.170.0030.02317.60
5.6.160.0030.02617.72
5.6.150.0020.02917.59
5.6.140.0100.01817.38
5.6.130.0020.02517.42
5.6.120.0070.02217.45
5.6.110.0070.02217.38
5.6.100.0050.02017.42
5.6.90.0060.02617.38
5.6.80.0030.02517.28
5.6.70.0100.02017.07
5.6.60.0060.02317.19
5.6.50.0070.01817.12
5.6.40.0030.02317.08
5.6.30.0080.02017.11
5.6.20.0030.02517.20
5.6.10.0060.02017.13
5.6.00.0050.01817.10
5.5.380.0050.02014.51
5.5.370.0000.02214.35
5.5.360.0020.02414.40
5.5.350.0050.03414.46
5.5.340.0020.04214.64
5.5.330.0050.02614.71
5.5.320.0020.02714.55
5.5.310.0060.02314.60
5.5.300.0080.02914.68
5.5.290.0030.02314.71
5.5.280.0030.02614.65
5.5.270.0050.02514.63
5.5.260.0030.02214.71
5.5.250.0000.02314.50
5.5.240.0000.02414.27
5.5.230.0080.01714.20
5.5.220.0020.02114.33
5.5.210.0020.02314.22
5.5.200.0050.01614.21
5.5.190.0030.02314.34
5.5.180.0050.02014.20
5.5.170.0000.00911.22
5.5.160.0000.02914.15
5.5.150.0020.01914.35
5.5.140.0050.01814.31
5.5.130.0080.04014.34
5.5.120.0070.04014.30
5.5.110.0050.03514.30
5.5.100.0030.02214.27
5.5.90.0050.02814.14
5.5.80.0030.04414.27
5.5.70.0070.03814.14
5.5.60.0080.03614.26
5.5.50.0070.03314.14
5.5.40.0100.03014.16
5.5.30.0030.02314.14
5.5.20.0050.03814.13
5.5.10.0030.04714.14
5.5.00.0070.03714.26
5.4.450.0100.02015.23
5.4.440.0050.02015.24
5.4.430.0050.01815.27
5.4.420.0020.02415.26
5.4.410.0030.02415.17
5.4.400.0000.02415.05
5.4.390.0030.01815.22
5.4.380.0020.02015.21
5.4.370.0020.02115.13
5.4.360.0030.01915.09
5.4.350.0030.01915.22
5.4.340.0040.01615.05
5.4.330.0000.00911.18
5.4.320.0050.01915.13
5.4.310.0030.02515.08
5.4.300.0040.03515.14
5.4.290.0100.04015.17
5.4.280.0050.03715.10
5.4.270.0120.03215.06
5.4.260.0070.03715.06
5.4.250.0100.03015.22
5.4.240.0030.04615.22
5.4.230.0040.02415.10
5.4.220.0100.01515.10
5.4.210.0050.02215.12
5.4.200.0070.03715.17
5.4.190.0080.02315.17
5.4.180.0030.03815.11
5.4.170.0030.03715.16
5.4.160.0090.03815.09
5.4.150.0080.03415.11
5.4.140.0050.02113.70
5.4.130.0090.03213.71
5.4.120.0030.02713.77
5.4.110.0050.03313.85
5.4.100.0050.02213.71
5.4.90.0120.01313.84
5.4.80.0120.03813.82
5.4.70.0070.02513.78
5.4.60.0020.02713.83
5.4.50.0050.04413.64
5.4.40.0070.02213.85
5.4.30.0050.03913.81
5.4.20.0020.03513.74
5.4.10.0060.02813.84
5.4.00.0020.02313.44
5.3.290.0030.02312.94
5.3.280.0040.04012.84
5.3.270.0020.04112.91
5.3.260.0050.02912.93
5.3.250.0020.04212.87
5.3.240.0030.04512.93
5.3.230.0020.02812.89
5.3.220.0070.04212.89
5.3.210.0060.04012.88
5.3.200.0030.04412.83
5.3.190.0030.04212.83
5.3.180.0020.02712.87
5.3.170.0040.02512.80
5.3.160.0090.03812.88
5.3.150.0100.01612.82
5.3.140.0080.04812.79
5.3.130.0060.03812.79
5.3.120.0070.03612.78
5.3.110.0030.02412.87
5.3.100.0020.04312.51
5.3.90.0060.03312.55
5.3.80.0030.02512.54
5.3.70.0050.03412.65
5.3.60.0020.03712.60
5.3.50.0080.03512.54
5.3.40.0030.04212.51
5.3.30.0030.02012.49
5.3.20.0030.03912.37
5.3.10.0050.03612.31
5.3.00.0050.04512.38
5.2.170.0010.02411.56
5.2.160.0020.03311.56
5.2.150.0050.01811.56
5.2.140.0050.01811.56
5.2.130.0050.01711.56
5.2.120.0040.03611.56
5.2.110.0030.03511.56
5.2.100.0050.02611.56
5.2.90.0050.02911.56
5.2.80.0030.03211.56
5.2.70.0020.02411.56
5.2.60.0000.02311.56
5.2.50.0120.02011.56
5.2.40.0020.03411.56
5.2.30.0050.03311.56
5.2.20.0090.01311.56
5.2.10.0050.03011.56
5.2.00.0060.02811.56
5.1.60.0020.02811.56
5.1.50.0030.01711.56
5.1.40.0020.01911.56
5.1.30.0070.02711.56
5.1.20.0050.03011.56
5.1.10.0050.02811.56
5.1.00.0040.02811.56
5.0.50.0040.02311.56
5.0.40.0030.02511.56
5.0.30.0060.02711.56
5.0.20.0040.02011.56
5.0.10.0010.01911.56
5.0.00.0040.01211.56
4.4.90.0030.02011.56
4.4.80.0030.01811.56
4.4.70.0020.01211.56
4.4.60.0030.01711.56
4.4.50.0020.01911.56
4.4.40.0000.02511.56
4.4.30.0010.01911.56
4.4.20.0050.01411.56
4.4.10.0030.02011.56
4.4.00.0020.03011.56
4.3.110.0070.01711.56
4.3.100.0020.01711.56
4.3.90.0030.01511.56
4.3.80.0000.01511.56
4.3.70.0020.01311.56
4.3.60.0040.01711.56
4.3.50.0020.01511.56
4.3.40.0000.02611.56
4.3.30.0020.01811.56
4.3.20.0000.02011.56
4.3.10.0020.01211.56
4.3.00.0050.01511.56

preferences:
44.31 ms | 401 KiB | 5 Q