3v4l.org

run code in 300+ PHP versions simultaneously
<?php $con=mysqli_connect("localhost","root","Krishna19942","newhopehospital"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } // escape variables for security $fname = mysqli_real_escape_string($con, $_POST['fname']); $lname = mysqli_real_escape_string($con, $_POST['lname']); $address= mysqli_real_escape_string($con, $post['address']); $pnum= mysqli_real_escape_string($con, $post['pnum']); $emptype= mysqli_real_escape_string($con, $post['emptype']); $wardname= mysqli_real_escape_string($con, $post['wardname']); $speciality= mysqli_real_escape_string($con, $post['speciality']); $sql="INSERT INTO doctordetails values ('','$fname','$lname','$address','$pnum','$emptype','$wardname','$speciality')"; $sql="update warddetails set Ward_Charge='$fname' where WardName='$wardname'"; if (!mysqli_query($con,$sql)) { die('Error: ' . mysqli_error($con)); } echo "1 record added"; echo "<br><br>"; //$sql="select * from kr.personal"; //testing 2.......// //if($_POST["fname"] && $_POST["lname"] && $_POST["address"] && $_POST["pnum"] && $_POST["emptype"] && $_POST["wardname"] && $_POST["speciality"] ) //{ // $servername="localhost"; // $username="root"; // $password="Krishna19942"; // $conn= mysql_connect($servername,$username,$password)or die(mysql_error()); // mysql_select_db("newhopehospital",$conn); // $sql="insert into doctordetails values ('$fname','$lname','$address','$pnum','$emptype','$wardname','$speciality')"; // $result=mysql_query($sql,$conn) or die(mysql_error()); //} //else print"invaild input data"; mysqli_close($con); header("Location: ../new_doctor.php"); exit; ?>

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.0110.00318.56
8.3.50.0120.00522.74
8.3.40.0140.00318.96
8.3.30.0150.00419.09
8.3.20.0040.00420.23
8.3.10.0030.00621.91
8.3.00.0030.00517.46
8.2.180.0100.01016.38
8.2.170.0130.00322.96
8.2.160.0080.00620.36
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00021.16
8.2.110.0000.00920.93
8.2.100.0090.00317.72
8.2.90.0050.00319.22
8.2.80.0030.00517.97
8.2.70.0060.00317.63
8.2.60.0040.00417.80
8.2.50.0050.00318.07
8.2.40.0000.00818.22
8.2.30.0040.00418.05
8.2.20.0040.00417.66
8.2.10.0000.00717.97
8.2.00.0040.00417.72
8.1.280.0140.00725.92
8.1.270.0000.00923.84
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00322.03
8.1.230.0060.00620.85
8.1.220.0000.00818.77
8.1.210.0030.00518.77
8.1.200.0060.00317.11
8.1.190.0000.00817.10
8.1.180.0070.00018.10
8.1.170.0040.00418.43
8.1.160.0040.00421.96
8.1.150.0070.00018.82
8.1.140.0000.00817.30
8.1.130.0000.00717.78
8.1.120.0050.00217.30
8.1.110.0050.00317.39
8.1.100.0000.00717.27
8.1.90.0030.00317.28
8.1.80.0040.00417.46
8.1.70.0040.00417.24
8.1.60.0090.00017.57
8.1.50.0040.00417.53
8.1.40.0090.00017.48
8.1.30.0060.00317.55
8.1.20.0000.00717.68
8.1.10.0040.00417.59
8.1.00.0040.00417.52
8.0.300.0030.00320.02
8.0.290.0050.00316.63
8.0.280.0000.00718.48
8.0.270.0030.00317.25
8.0.260.0070.00017.17
8.0.250.0030.00317.03
8.0.240.0070.00016.96
8.0.230.0040.00416.89
8.0.220.0070.00016.84
8.0.210.0000.00716.81
8.0.200.0050.00216.98
8.0.190.0070.00016.93
8.0.180.0040.00416.85
8.0.170.0000.00817.00
8.0.160.0060.00317.07
8.0.150.0000.00716.88
8.0.140.0070.00316.83
8.0.130.0060.00013.36
8.0.120.0040.00416.91
8.0.110.0070.00016.77
8.0.100.0000.00716.82
8.0.90.0040.00416.77
8.0.80.0060.01016.95
8.0.70.0000.00717.01
8.0.60.0030.00516.73
8.0.50.0080.00016.90
8.0.30.0110.00917.03
8.0.20.0080.01117.40
8.0.10.0000.00716.98
8.0.00.0150.00316.78
7.4.330.0060.00015.03
7.4.320.0030.00316.33
7.4.300.0000.00616.64
7.4.290.0030.00616.47
7.4.280.0040.00416.39
7.4.270.0030.00516.50
7.4.260.0090.00016.59
7.4.250.0000.00716.45
7.4.240.0040.00316.55
7.4.230.0000.00716.43
7.4.220.0110.00716.54
7.4.210.0030.01616.70
7.4.200.0030.00316.29
7.4.160.0110.00516.75
7.4.150.0150.00317.40
7.4.140.0110.00917.86
7.4.130.0100.00716.53
7.4.120.0160.00416.60
7.4.110.0030.01316.56
7.4.100.0090.00916.44
7.4.90.0060.01216.61
7.4.80.0060.01519.39
7.4.70.0070.01116.69
7.4.60.0090.00816.38
7.4.50.0030.00616.27
7.4.40.0130.00916.47
7.4.30.0060.00916.36
7.4.00.0090.00914.84
7.3.330.0000.00613.13
7.3.320.0000.00513.23
7.3.310.0030.00316.36
7.3.300.0030.00316.32
7.3.290.0070.01116.33
7.3.280.0100.00816.27
7.3.270.0210.00317.40
7.3.260.0120.00616.36
7.3.250.0100.00916.47
7.3.240.0060.01616.34
7.3.230.0120.00616.51
7.3.210.0140.00416.24
7.3.200.0090.00619.39
7.3.190.0120.00916.38
7.3.180.0140.00716.36
7.3.170.0030.01316.35
7.3.160.0110.00516.26
7.3.10.0100.00316.59
7.3.00.0030.00716.52
7.2.330.0100.01416.27
7.2.320.0130.00716.59
7.2.310.0060.01216.58
7.2.300.0040.01216.51
7.2.290.0070.01016.45
7.2.130.0100.00716.57
7.2.120.0070.01016.64
7.2.110.0070.01016.80
7.2.100.0030.00816.63
7.2.90.0060.01016.63
7.2.80.0000.01516.48
7.2.70.0080.00416.79
7.2.60.0020.01216.90
7.2.50.0040.00816.79
7.2.40.0030.01316.70
7.2.30.0060.00816.83
7.2.20.0100.00316.84
7.2.10.0070.00716.64
7.2.00.0040.01017.94
7.1.250.0100.00615.62
7.1.200.0030.01015.52
7.1.100.0110.00017.99
7.1.70.0000.00816.77
7.1.60.0150.00919.40
7.1.50.0040.01416.79
7.1.00.0030.07722.55
7.0.200.0030.00316.82
7.0.140.0030.07322.13
7.0.60.0100.06020.06
7.0.50.0030.08017.91
7.0.40.0170.03020.09
7.0.30.0230.07020.04
7.0.20.0270.07720.16
7.0.10.0100.08720.12
7.0.00.0000.09020.32
5.6.280.0000.07721.08
5.6.210.0070.07320.48
5.6.200.0130.05318.19
5.6.190.0070.08020.57
5.6.180.0400.07320.77
5.6.170.0300.05020.50
5.6.160.0070.08320.71
5.6.150.0070.03718.16
5.6.140.0030.08318.20
5.6.130.0070.08718.14
5.6.120.0030.07721.02
5.6.110.0130.05320.96
5.6.100.0100.06320.99
5.6.90.0200.07320.88
5.6.80.0130.07320.38
5.5.350.0070.06020.41
5.5.340.0070.03317.89
5.5.330.0170.07320.43
5.5.320.0370.07320.25
5.5.310.0330.07720.27
5.5.300.0200.06718.02
5.5.290.0100.07717.97
5.5.280.0170.04320.88
5.5.270.0030.08720.68
5.5.260.0170.07020.85
5.5.250.0100.08020.70
5.5.240.0100.04320.27
5.4.450.0000.05019.12
5.4.440.0000.05319.13
5.4.430.0200.06719.41
5.4.420.0130.03719.54
5.4.410.0070.05019.00
5.4.400.0070.03319.09
5.4.390.0070.03319.13
5.4.380.0070.03318.95
5.4.370.0030.04019.25
5.4.360.0000.04019.06
5.4.350.0000.04018.94
5.4.340.0000.03719.16
5.4.320.0070.03319.09
5.4.310.0070.03019.13
5.4.300.0000.03719.08
5.4.290.0100.03019.13
5.4.280.0000.04019.05
5.4.270.0000.04018.78
5.4.260.0000.03719.16
5.4.250.0000.03718.88
5.4.240.0000.03719.13
5.4.230.0070.03019.12
5.4.220.0000.03719.09
5.4.210.0000.03719.15
5.4.200.0030.04019.24
5.4.190.0000.03719.09
5.4.180.0000.03719.07
5.4.170.0070.05719.12
5.4.160.0070.06019.19
5.4.150.0030.04719.11
5.4.140.0200.03716.43
5.4.130.0100.06716.16
5.4.120.0100.05716.22
5.4.110.0070.07016.06
5.4.100.0070.03316.22
5.4.90.0030.03716.45
5.4.80.0000.07016.46
5.4.70.0070.04316.37
5.4.60.0000.03716.36
5.4.50.0000.03716.36
5.4.40.0070.07016.04
5.4.30.0030.06316.40
5.4.20.0070.05016.33
5.4.10.0000.08016.03
5.4.00.0000.05015.78
5.3.290.0000.04014.54
5.3.280.0030.03714.59
5.3.270.0000.08014.57
5.3.260.0030.07014.50
5.3.250.0030.04314.50
5.3.240.0130.05014.46
5.3.230.0000.07714.52
5.3.220.0070.04314.63
5.3.210.0030.07714.51
5.3.200.0030.04314.43
5.3.190.0000.07714.50
5.3.180.0070.05714.52
5.3.170.0030.04714.42
5.3.160.0030.04314.52
5.3.150.0030.03314.41
5.3.140.0000.07714.52
5.3.130.0030.06014.42
5.3.120.0070.05714.66
5.3.110.0070.07014.50
5.3.100.0000.05013.99
5.3.90.0000.06313.91
5.3.80.0130.06713.81
5.3.70.0030.05313.83
5.3.60.0100.05313.86
5.3.50.0070.04713.91
5.3.40.0000.07014.05
5.3.30.0000.07314.03
5.3.20.0100.07313.66
5.3.10.0130.06013.65
5.3.00.0130.06313.60
5.2.170.0070.04712.28
5.2.160.0000.03712.28
5.2.150.0070.05712.28
5.2.140.0100.05712.28
5.2.130.0030.05312.28
5.2.120.0030.05012.28
5.2.110.0100.03712.28
5.2.100.0000.06012.28
5.2.90.0070.05012.28
5.2.80.0000.05312.28
5.2.70.0100.05712.28
5.2.60.0100.06012.28
5.2.50.0030.05712.28
5.2.40.0070.06012.28
5.2.30.0000.04312.28
5.2.20.0070.04012.28
5.2.10.0030.04312.28
5.2.00.0070.05012.28
5.1.60.0030.03712.28
5.1.50.0000.06012.28
5.1.40.0100.04712.28
5.1.30.0100.03312.28
5.1.20.0030.04312.28
5.1.10.0030.03712.28
5.1.00.0070.05012.28
5.0.50.0000.04312.28
5.0.40.0000.03012.28
5.0.30.0030.06012.28
5.0.20.0030.03012.28
5.0.10.0030.04312.28
5.0.00.0000.05312.28
4.4.90.0000.02312.28
4.4.80.0030.03012.28
4.4.70.0070.03312.28
4.4.60.0000.03312.28
4.4.50.0030.03712.28
4.4.40.0070.04312.28
4.4.30.0030.03012.28
4.4.20.0030.04012.28
4.4.10.0000.03012.28
4.4.00.0000.05312.28
4.3.110.0030.02012.28
4.3.100.0000.02712.28
4.3.90.0070.03312.28
4.3.80.0000.03312.28
4.3.70.0000.01712.28
4.3.60.0030.03312.28
4.3.50.0000.03712.28
4.3.40.0030.04712.28
4.3.30.0000.04012.28
4.3.20.0000.03012.28
4.3.10.0000.02712.28
4.3.00.0030.03712.28

preferences:
37.65 ms | 401 KiB | 5 Q