3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '$x=100; ((800 + 20) - 800 / 2)'; $tokens = token_get_all("<?php {$input}"); $expr = ''; foreach($tokens as $token){ if(is_string($token)){ if(in_array($token, array('(', ')', '+', '-', '/', '*','if','IF' , '{' ,'}' , ';' ,'$'), 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.0170.00318.68
8.3.50.0070.00717.86
8.3.40.0040.01118.96
8.3.30.0070.00718.63
8.3.20.0040.00421.78
8.3.10.0080.00023.51
8.3.00.0000.00823.36
8.2.180.0190.00316.50
8.2.170.0120.00622.96
8.2.160.0070.00720.16
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00320.89
8.2.120.0040.00426.35
8.2.110.0060.00322.30
8.2.100.0080.00418.28
8.2.90.0040.00420.62
8.2.80.0040.00418.04
8.2.70.0040.00418.04
8.2.60.0030.00618.16
8.2.50.0000.00718.34
8.2.40.0040.00420.65
8.2.30.0030.00620.55
8.2.20.0000.00818.15
8.2.10.0040.00418.04
8.2.00.0070.00018.11
8.1.280.0000.01425.92
8.1.270.0070.00021.97
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00622.25
8.1.230.0110.00019.16
8.1.220.0050.00317.79
8.1.210.0060.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.22
8.1.180.0050.00318.10
8.1.170.0060.00318.47
8.1.160.0040.00418.77
8.1.150.0000.00720.26
8.1.140.0040.00417.73
8.1.130.0030.00518.99
8.1.120.0030.00417.36
8.1.110.0000.00717.44
8.1.100.0040.00417.35
8.1.90.0030.00717.44
8.1.80.0000.00817.50
8.1.70.0050.00317.48
8.1.60.0040.00417.59
8.1.50.0000.00817.50
8.1.40.0000.00717.54
8.1.30.0050.00317.61
8.1.20.0080.00017.48
8.1.10.0050.00217.57
8.1.00.0000.00817.44
8.0.300.0040.00419.66
8.0.290.0040.00416.63
8.0.280.0040.00418.36
8.0.270.0080.00017.34
8.0.260.0030.00316.70
8.0.250.0040.00417.02
8.0.240.0030.00617.00
8.0.230.0030.00316.84
8.0.220.0000.00716.89
8.0.210.0040.00416.87
8.0.200.0070.00016.93
8.0.190.0040.00416.87
8.0.180.0080.00016.95
8.0.170.0000.00816.94
8.0.160.0040.00416.79
8.0.150.0000.00716.80
8.0.140.0000.00716.87
8.0.130.0000.00513.27
8.0.120.0030.00516.75
8.0.110.0070.00017.00
8.0.100.0040.00416.76
8.0.90.0040.00416.94
8.0.80.0060.01016.80
8.0.70.0050.00316.86
8.0.60.0040.00416.94
8.0.50.0070.00017.00
8.0.30.0070.01117.12
8.0.20.0060.01317.40
8.0.10.0040.00417.08
8.0.00.0110.01016.87
7.4.330.0000.00515.55
7.4.320.0040.00416.63
7.4.300.0000.00616.61
7.4.290.0030.00316.50
7.4.280.0030.00516.51
7.4.270.0040.00416.50
7.4.260.0030.00316.56
7.4.250.0040.00416.47
7.4.240.0080.00016.61
7.4.230.0030.00316.50
7.4.220.0040.00416.46
7.4.210.0060.00916.53
7.4.200.0040.00416.58
7.4.160.0110.00616.58
7.4.140.0130.00617.86
7.4.130.0120.00616.46
7.4.120.0070.01016.39
7.4.110.0030.01516.38
7.4.100.0090.00916.41
7.4.90.0130.00516.50
7.4.80.0110.01219.39
7.4.70.0100.01316.26
7.4.60.0120.00916.48
7.4.50.0100.00716.29
7.4.40.0110.00516.44
7.4.00.0000.01715.13
7.3.330.0030.00313.24
7.3.320.0030.00313.25
7.3.310.0000.00716.27
7.3.300.0000.00716.23
7.3.290.0090.00616.34
7.3.280.0080.01216.36
7.3.260.0100.01216.47
7.3.250.0100.00716.35
7.3.240.0090.01016.52
7.3.230.0100.00616.42
7.3.210.0090.00616.49
7.3.200.0070.01016.68
7.3.190.0100.00516.57
7.3.180.0160.00716.32
7.3.170.0120.00316.66
7.3.160.0060.01016.27
7.3.120.0100.00714.75
7.3.110.0030.00715.14
7.3.100.0000.01415.08
7.3.90.0070.00714.90
7.3.80.0080.00514.70
7.3.70.0040.01114.55
7.3.60.0030.01014.68
7.3.50.0030.00714.78
7.3.40.0060.00614.84
7.3.30.0140.00014.90
7.3.20.0060.00616.83
7.3.10.0050.00816.48
7.3.00.0100.00816.54
7.2.330.0000.01616.59
7.2.320.0060.01316.52
7.2.310.0070.01016.64
7.2.300.0100.00716.55
7.2.290.0080.00916.45
7.2.240.0100.00715.17
7.2.230.0000.01315.12
7.2.220.0040.00815.21
7.2.210.0100.00715.04
7.2.200.0070.00714.73
7.2.190.0070.01114.94
7.2.180.0070.01014.88
7.2.170.0100.00315.08
7.2.160.0060.00614.52
7.2.150.0060.00917.03
7.2.140.0040.01116.96
7.2.130.0090.01116.79
7.2.120.0120.00616.74
7.2.110.0020.01316.66
7.2.100.0090.01016.66
7.2.90.0120.00616.78
7.2.80.0090.01116.71
7.2.70.0050.01216.84
7.2.60.0090.00816.84
7.2.50.0080.01016.86
7.2.40.0100.00816.78
7.2.30.0130.00817.45
7.2.20.0120.00817.52
7.2.10.0090.01217.50
7.2.00.0110.00917.75
7.1.330.0070.01015.45
7.1.320.0040.01215.82
7.1.310.0000.00915.73
7.1.300.0070.00615.80
7.1.290.0110.00415.56
7.1.280.0080.00015.68
7.1.270.0040.01115.80
7.1.260.0070.00715.61
7.1.250.0090.00915.63
7.1.200.0000.01416.01
7.1.150.0110.01116.82
7.1.140.0120.01418.63
7.1.130.0120.01518.82
7.1.120.0090.01718.49
7.1.110.0110.01818.20
7.1.100.0130.01217.98
7.1.90.0140.00917.93
7.1.80.0110.01118.09
7.1.70.0100.01117.13
7.1.60.0320.01534.82
7.1.50.0300.02034.89
7.1.40.0260.01334.49
7.1.30.0260.01534.27
7.1.20.0220.01834.54
7.1.10.0090.00816.46
7.1.00.0080.01416.57

preferences:
32.75 ms | 400 KiB | 5 Q