3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head> <title>Update a Record in MySQL Database</title> </head> <body> <?php if(isset($_POST['update'])) { $dbhost = 'localhost:3036'; $dbuser = 'root'; $dbpass = 'rootpassword'; $conn = mysql_connect($dbhost, $dbuser, $dbpass); if(! $conn ) { die('Could not connect: ' . mysql_error()); } $emp_id = $_POST['emp_id']; $emp_salary = $_POST['emp_salary']; $sql = "UPDATE employee ". "SET emp_salary = $emp_salary ". "WHERE emp_id = $emp_id" ; mysql_select_db('test_db'); $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not update data: ' . mysql_error()); } echo "Updated data successfully\n"; mysql_close($conn); } else { ?> <form method="post" action="<?php $_PHP_SELF ?>"> <table width="400" border="0" cellspacing="1" cellpadding="2"> <tr> <td width="100">Employee ID</td> <td><input name="emp_id" type="text" id="emp_id"></td> </tr> <tr> <td width="100">Employee Salary</td> <td><input name="emp_salary" type="text" id="emp_salary"></td> </tr> <tr> <td width="100"> </td> <td> </td> </tr> <tr> <td width="100"> </td> <td> <input name="update" type="submit" id="update" value="Update"> </td> </tr> </table> </form> <?php } ?> </body> </html>

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.0070.01016.75
8.3.50.0130.00718.09
8.3.40.0060.01218.67
8.3.30.0070.01018.92
8.3.20.0070.00020.25
8.3.10.0000.00721.86
8.3.00.0080.00019.20
8.2.180.0110.00718.16
8.2.170.0130.00618.74
8.2.160.0110.00422.96
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00019.66
8.2.110.0060.00320.35
8.2.100.0040.00818.00
8.2.90.0000.00919.05
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0040.00417.92
8.2.50.0000.00818.07
8.2.40.0070.00318.16
8.2.30.0000.00818.08
8.2.20.0000.00817.75
8.2.10.0050.00318.07
8.2.00.0080.00017.73
8.1.280.0120.00925.92
8.1.270.0080.00018.87
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0090.00022.07
8.1.230.0040.00718.99
8.1.220.0060.00317.74
8.1.210.0080.00018.77
8.1.200.0060.00317.23
8.1.190.0080.00017.11
8.1.180.0040.00418.10
8.1.170.0050.00318.71
8.1.160.0000.00722.03
8.1.150.0070.00018.68
8.1.140.0020.00517.31
8.1.130.0000.00817.76
8.1.120.0000.00717.30
8.1.110.0050.00317.41
8.1.100.0040.00417.38
8.1.90.0030.00517.36
8.1.80.0020.00517.23
8.1.70.0000.00717.38
8.1.60.0040.00717.51
8.1.50.0030.00517.43
8.1.40.0040.00417.46
8.1.30.0080.00017.57
8.1.20.0060.00617.47
8.1.10.0020.00517.45
8.1.00.0000.01117.48
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0070.00018.39
8.0.270.0080.00017.28
8.0.260.0030.00317.16
8.0.250.0030.00616.86
8.0.240.0040.00416.87
8.0.230.0070.00016.87
8.0.220.0070.00016.77
8.0.210.0030.00316.75
8.0.200.0030.00316.81
8.0.190.0050.00316.79
8.0.180.0070.00016.88
8.0.170.0040.00416.91
8.0.160.0000.00716.74
8.0.150.0040.00416.84
8.0.140.0040.00716.80
8.0.130.0030.00513.27
8.0.120.0000.00716.76
8.0.110.0030.00616.75
8.0.100.0000.00716.85
8.0.90.0050.00316.90
8.0.80.0070.00716.77
8.0.70.0020.00516.71
8.0.60.0070.00016.71
8.0.50.0040.00416.64
8.0.30.0180.00816.88
8.0.20.0160.00317.40
8.0.10.0030.00616.91
8.0.00.0070.01016.58
7.4.330.0000.00615.03
7.4.320.0000.00616.49
7.4.300.0030.00316.54
7.4.290.0040.00416.44
7.4.280.0000.00716.45
7.4.270.0040.00416.50
7.4.260.0060.00316.46
7.4.250.0040.00416.40
7.4.240.0020.00516.51
7.4.230.0030.00316.52
7.4.220.0070.01116.46
7.4.210.0150.00316.55
7.4.200.0080.00016.34
7.4.160.0100.01016.52
7.4.150.0100.01417.40
7.4.140.0110.00917.86
7.4.130.0070.00916.48
7.4.120.0090.00816.48
7.4.110.0180.00016.48
7.4.100.0030.01916.49
7.4.90.0070.01016.41
7.4.80.0110.00719.39
7.4.70.0060.01016.42
7.4.60.0100.00716.39
7.4.50.0050.00016.38
7.4.40.0130.00316.40
7.4.30.0090.01416.67
7.4.10.0070.01314.61
7.4.00.0020.01414.93
7.3.330.0000.00513.15
7.3.320.0000.00513.16
7.3.310.0030.00316.04
7.3.300.0000.00616.19
7.3.290.0050.00916.23
7.3.280.0130.00416.23
7.3.270.0170.00017.40
7.3.260.0130.01016.46
7.3.250.0110.01216.31
7.3.240.0080.01316.29
7.3.230.0080.00816.39
7.3.210.0070.01016.24
7.3.200.0070.01019.39
7.3.190.0060.00916.48
7.3.180.0070.01016.33
7.3.170.0100.01016.27
7.3.160.0100.00616.21
7.3.130.0100.00714.68
7.3.120.0060.01214.73
7.3.110.0100.01014.95
7.3.100.0040.01114.80
7.3.90.0030.01214.60
7.3.80.0060.00914.39
7.3.70.0060.00914.45
7.3.60.0070.00714.85
7.3.50.0060.00914.60
7.3.40.0040.00714.66
7.3.30.0090.00314.74
7.3.20.0100.00316.65
7.3.10.0060.00916.32
7.3.00.0070.00716.16
7.2.330.0070.01016.41
7.2.320.0110.01716.65
7.2.310.0070.01016.63
7.2.300.0090.00816.36
7.2.290.0060.01616.67
7.2.260.0040.01415.05
7.2.250.0100.00614.93
7.2.240.0090.00615.23
7.2.230.0030.01314.91
7.2.220.0100.00714.81
7.2.210.0030.01014.72
7.2.200.0040.01114.93
7.2.190.0060.00914.98
7.2.180.0000.01215.17
7.2.170.0030.01415.06
7.2.160.0110.00415.13
7.2.150.0080.00616.72
7.2.140.0080.00316.76
7.2.130.0100.00316.61
7.2.120.0090.00616.91
7.2.110.0120.00316.93
7.2.100.0060.00316.88
7.2.90.0040.01116.47
7.2.80.0000.00916.64
7.2.70.0030.01316.97
7.2.60.0130.00316.95
7.2.50.0070.00316.84
7.2.40.0070.00716.79
7.2.30.0090.00917.02
7.2.20.0070.00316.65
7.2.10.0060.01216.64
7.2.00.0070.01018.03
7.1.330.0070.00715.62
7.1.320.0070.00715.64
7.1.310.0090.00615.32
7.1.300.0070.00715.84
7.1.290.0040.00715.55
7.1.280.0040.01115.48
7.1.270.0090.00615.32
7.1.260.0100.00315.64
7.1.250.0070.00715.64
7.1.240.0070.00415.63
7.1.230.0060.00915.42
7.1.220.0090.00315.47
7.1.210.0040.00715.79
7.1.200.0060.00915.63
7.1.190.0090.00615.68
7.1.180.0040.00715.63
7.1.170.0110.00415.73
7.1.160.0000.01215.84
7.1.150.0000.01415.71
7.1.140.0030.01015.77
7.1.130.0090.00315.25
7.1.120.0100.00315.52
7.1.110.0040.00815.63
7.1.100.0090.00616.57
7.1.90.0070.00715.46
7.1.80.0040.00815.80
7.1.70.0060.00616.20
7.1.60.0070.01217.35
7.1.50.0100.00616.15
7.1.40.0060.00615.35
7.1.30.0080.00415.66
7.1.20.0040.01115.45
7.1.10.0040.00415.61
7.1.00.0030.04018.94
7.0.330.0130.00315.25
7.0.320.0000.01515.19
7.0.310.0080.00815.40
7.0.300.0030.01015.30
7.0.290.0110.00415.33
7.0.280.0090.00615.45
7.0.270.0000.01415.32
7.0.260.0040.01115.50
7.0.250.0000.01415.36
7.0.240.0070.00715.09
7.0.230.0080.00815.41
7.0.220.0080.00415.23
7.0.210.0060.00315.22
7.0.200.0120.00714.99
7.0.190.0030.00915.36
7.0.180.0040.00815.31
7.0.170.0040.01115.39
7.0.160.0070.00715.09
7.0.150.0030.01015.34
7.0.140.0050.04218.58
7.0.130.0070.00715.49
7.0.120.0030.00615.30
7.0.110.0030.01015.38
7.0.100.0090.00315.35
7.0.90.0030.00914.90
7.0.80.0070.00715.46
7.0.70.0000.01415.38
7.0.60.0030.04717.71
7.0.50.0050.04516.39
7.0.40.0070.04716.91
7.0.30.0160.03716.84
7.0.20.0250.03516.61
7.0.10.0060.03316.72
7.0.00.0070.02216.73
5.6.400.0100.00014.56
5.6.390.0030.00914.60
5.6.380.0100.00314.34
5.6.370.0080.00814.64
5.6.360.0070.01013.99
5.6.350.0070.00714.39
5.6.340.0030.00514.64
5.6.330.0040.01114.18
5.6.320.0070.00414.58
5.6.310.0130.00314.43
5.6.300.0040.01114.25
5.6.290.0110.00014.19
5.6.280.0060.04017.56
5.6.270.0070.00714.09
5.6.260.0080.00414.48
5.6.250.0070.00714.21
5.6.240.0000.01014.59
5.6.230.0000.01514.46
5.6.220.0040.01414.25
5.6.210.0030.02917.42
5.6.200.0090.04316.27
5.6.190.0060.03517.65
5.6.180.0200.02617.54
5.6.170.0130.04517.38
5.6.160.0040.03917.46
5.6.150.0070.04216.19
5.6.140.0000.02716.14
5.6.130.0040.03416.21
5.6.120.0060.05017.84
5.6.110.0030.04417.70
5.6.100.0070.04717.63
5.6.90.0070.02617.53
5.6.80.0030.02217.33
5.6.70.0060.00914.41
5.6.60.0100.00714.23
5.6.50.0040.01114.15
5.6.40.0060.00614.06
5.6.30.0070.00714.39
5.6.20.0040.01114.48
5.6.10.0070.01014.26
5.6.00.0090.00614.27
5.5.380.0060.00914.53
5.5.370.0040.01114.15
5.5.360.0000.01113.86
5.5.350.0170.04417.29
5.5.340.0070.03016.23
5.5.330.0080.03617.15
5.5.320.0130.02517.14
5.5.310.0220.03517.41
5.5.300.0050.03215.99
5.5.290.0080.04316.16
5.5.280.0080.04617.58
5.5.270.0120.04417.61
5.5.260.0070.02617.50
5.5.250.0030.04217.52
5.5.240.0080.04117.22
5.5.230.0070.00713.95
5.5.220.0060.00914.04
5.5.210.0030.00614.23
5.5.200.0110.00314.20
5.5.190.0070.00714.24
5.5.180.0100.00714.21
5.5.170.0060.00914.12
5.5.160.0000.01214.16
5.5.150.0090.00313.97
5.5.140.0070.00713.66
5.5.130.0030.00614.07
5.5.120.0040.00713.78
5.5.110.0040.01114.38
5.5.100.0000.01414.04
5.5.90.0070.00714.02
5.5.80.0030.00913.99
5.5.70.0030.01014.02
5.5.60.0170.00014.18
5.5.50.0070.00714.15
5.5.40.0030.01014.06
5.5.30.0080.00614.34
5.5.20.0060.00614.03
5.5.10.0120.00614.19
5.5.00.0070.01014.21
5.4.450.0380.02815.29
5.4.440.0240.03315.32
5.4.430.0070.03315.28
5.4.420.0130.03315.28
5.4.410.0070.04015.23
5.4.400.0100.03015.12
5.4.390.0100.03014.77
5.4.380.0100.03014.86
5.4.370.0150.03214.91
5.4.360.0140.03014.90
5.4.350.0120.03214.87
5.4.340.0100.03314.89
5.4.330.0030.01011.05
5.4.320.0150.03014.78
5.4.310.0100.03114.77
5.4.300.0100.03014.91
5.4.290.0100.03214.79
5.4.280.0130.03614.77
5.4.270.0090.03014.74
5.4.260.0100.02814.84
5.4.250.0140.03014.85
5.4.240.0120.03514.74
5.4.230.0120.02814.74
5.4.220.0130.02914.88
5.4.210.0150.02514.86
5.4.200.0130.02813.82
5.4.190.0070.03414.91
5.4.180.0140.02514.75
5.4.170.0150.02814.76
5.4.160.0070.03214.87
5.4.150.0130.03714.87
5.4.140.0130.02613.64
5.4.130.0170.02213.59
5.4.120.0100.02613.61
5.4.110.0120.02513.66
5.4.100.0140.02813.65
5.4.90.0120.03013.59
5.4.80.0080.02613.66
5.4.70.0080.03013.66
5.4.60.0110.03013.58
5.4.50.0100.03013.57
5.4.40.0030.03713.67
5.4.30.0110.03413.52
5.4.20.0100.03013.59
5.4.10.0090.03113.70
5.4.00.0100.02713.38
5.3.290.0330.05314.59
5.3.280.0170.06314.52
5.3.270.0170.06714.59
5.3.260.0370.04314.52
5.3.250.0200.04714.58
5.3.240.0130.06014.62
5.3.230.0300.04014.69
5.3.220.0200.07314.55
5.3.210.0270.06314.54
5.3.200.0200.06714.54
5.3.190.0200.05314.51
5.3.180.0230.05314.55
5.3.170.0230.05014.43
5.3.160.0270.06014.66
5.3.150.0370.06714.55
5.3.140.0170.05314.48
5.3.130.0130.05714.46
5.3.120.0370.04714.47
5.3.110.0100.06014.64
5.3.100.0200.06314.04
5.3.90.0230.04313.95
5.3.80.0230.05014.00
5.3.70.0200.05013.94
5.3.60.0130.05313.96
5.3.50.0230.04013.86
5.3.40.0100.05713.86
5.3.30.0130.05313.85
5.3.20.0130.05313.63
5.3.10.0200.04313.63
5.3.00.0100.05713.60
5.2.170.0200.03711.30
5.2.160.0130.04011.08
5.2.150.0100.04711.18
5.2.140.0100.04711.15
5.2.130.0070.04711.03
5.2.120.0030.05311.14
5.2.110.0170.04711.08
5.2.100.0100.04311.08
5.2.90.0130.04311.24
5.2.80.0170.04011.16
5.2.70.0200.03711.13
5.2.60.0200.04011.20
5.2.50.0130.04011.17
5.2.40.0230.03311.02
5.2.30.0130.04010.95
5.2.20.0130.05010.95
5.2.10.0170.04710.81
5.2.00.0200.03010.88
5.1.60.0070.04010.07
5.1.50.0100.0439.94
5.1.40.0070.04010.05
5.1.30.0100.04010.44
5.1.20.0170.03010.41
5.1.10.0100.03310.14
5.1.00.0100.03710.11
5.0.50.0070.0278.57
5.0.40.0030.0308.41
5.0.30.0000.0508.24
5.0.20.0030.0338.27
5.0.10.0100.0278.21
5.0.00.0030.0478.15
4.4.90.0070.0205.95
4.4.80.0100.0205.91
4.4.70.0100.0205.97
4.4.60.0030.0235.93
4.4.50.0030.0235.89
4.4.40.0070.0435.98
4.4.30.0070.0205.93
4.4.20.0070.0205.97
4.4.10.0070.0275.98
4.4.00.0070.0335.96
4.3.110.0070.0235.82
4.3.100.0030.0235.86
4.3.90.0100.0175.79
4.3.80.0070.0305.80
4.3.70.0000.0235.78
4.3.60.0030.0235.78
4.3.50.0070.0205.82
4.3.40.0100.0305.80
4.3.30.0000.0304.59
4.3.20.0100.0174.57
4.3.10.0030.0204.57
4.3.00.0170.0206.97

preferences:
61.39 ms | 400 KiB | 5 Q