3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP //Connect to DB include ("db_connect.php"); $con; if (!$con){ die('Hata: ' . mysql_error()); } error_reporting(0); session_start(); if (isset($_SESSION['regid'])){ $registerId = $_SESSION['regid'];; }else{ //header("location:index.php"); //$newPage = "index.php"; } // echo "regId: " . $registerId; if (isset($_POST['submit'])){ $join = $_POST['join']; $institution = $_POST['institution']; $program = $_POST['program']; $country = $_POST['country']; $city = $_POST['city']; $date = date("Y-m-d"); var_dump($_POST); if ($join=='noJoin'){ $newPage = "saving.php"; echo "you're free!"; }else if (($institution=='')||($program=='')||($country=='')||($city=='')){//not enough info $error = "Lütfen eksik veya hatalı bilgi olmadığından emin olunuz."; } else { $query = "INSERT into incnet.profilesSummerCampsTemp VALUES ('NULL', '$registerId', '$institution', '$program', '$country', '$city', '$date')"; //echo $query . "<br>"; mysql_query($query); $newPage = "saving.php"; } }?><!doctype html><html> <head> <link rel="shortcut icon" href="../incnet/favicon.ico" > <meta charset="utf-8"> <link rel="stylesheet" href="style.css" type="text/css" media="screen" title="no title" charset="utf-8"> <?PHP if ($newPage!=''){ echo "<meta http-equiv='refresh' content='0; url=saving.php'>"; } ?> <style> .p1 { display:inline-block; } </style> </head> <body OnLoad="document.summerCamps.institution.focus();"> <div class='container'> <div class='titleDiv'> 6. Yaz Programı ve Staj Bilgileri </div><hr> <form name="summerCamps" method='POST' autocomplete='off'> <input type='hidden' name='camp_count' id='campCount' value='1'> <div style='color: #c1272d; font-size:12pt'><?PHP echo $error; ?></div> <input type="checkbox" name="join" value="noJoin" onclick="showHide()">Yaz programına katılmadım.<br> <div id='camps'> <?php for ($camp_count = (isset($_POST["camp_count"]))?$_POST["camp_count"]:1, $loop_count=0; $camp_count>$loop_count; $loop_count++) { $val1 = $institution[$loop_count]; $val2 = $program[$loop_count]; $val3 = $country[$loop_count]; $val4 = $city[$loop_count]; echo " <table class='p1'> <tr> <td>Üniversite/Kurum</td> <td><input type='text' name='institution[]' maxlength='150' onkeypress='return isGoodKey(event)' value='" . $val1 . /*echo $institution;*/ "'></td> </tr><tr> <td>Program</td> <td><input type='text' name='program[]' maxlength='150' onkeypress='return isGoodKey(event)' value='" . $val2 . /* echo $program; */"'></td> </tr><tr> <td>Ülke</td> <td><input type='text' name='country[]' maxlength='40' onkeypress='return isGoodKey(event)' value='" . $val3 . /* echo $country; */"'></td> </tr><tr> <td>Şehir</td> <td><input type='text' name='city[]' maxlength='100' onkeypress='return isGoodKey(event)' value='" . $val4 . /* echo $city; */"'></td> </tr> </table>"; } ?> </div> <input type='submit' name='submit' value='Devam' style='width:120px; height: 40px; font-size:18pt;'> <button type='button' id='addCamp' style='width:165px; height: 40px; font-size:12pt; position:relative; bottom:2px;'>Add Another Camp</button> <br>*Lütfen tüm alanları doldurunuz. </form><br><br> </div><div class="copyright">© INÇNET</div> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script> <script> $(document).ready(function(){ $("#addCamp").click(function(){ campCount = $("#campCount").val(); campCount++; $("#campCount").val(campCount); newCamp = "<table class='p1'><tr><td>Üniversite/Kurum</td><td><input type='text' name='institution' maxlength='150' onkeypress='return isGoodKey(event)'></td></tr><tr><td>Program</td><td><input type='text' name='program' maxlength='150' onkeypress='return isGoodKey(event)'></td></tr><tr><td>Ülke</td><td><input type='text' name='country' maxlength='40' onkeypress='return isGoodKey(event)'></td></tr><tr><td>Şehir</td><td><input type='text' name='city' maxlength='100' onkeypress='return isGoodKey(event)'></td></tr></table>"; $('#camps').append(newCamp); }); }); function showHide(){ if ($(".p1").is(":hidden")==true){ $(".p1").css("display", "inline-block"); document.summerCamps.institution.focus(); } else { $(".p1").hide(); } } function isGoodKey(evt){ var charCode = (evt.which) ? evt.which : event.keyCode var charCode = evt.which || evt.keyCode; var charTyped = String.fromCharCode(charCode); var myChars = new Array("A","B","C","Ç","D","E","F","G","Ğ","H","I","İ","J","K","L","M","N","O","Ö","P","R","S","Ş","T","U","Ü","V","Y","Z","1","2","3","4","4","5","6","7","8","9","0",",",":",".","/","a","b","c","ç","d","e","f","g","ğ","h","ı","i","j","k","l","m","n","o","ö","p","r","s","ş","t","u","ü","v","y","z","Q","q","W","w","x","X"," ","@"); if((myChars.indexOf(charTyped) != -1)||charCode==8){ return true; }else{ alert("Bu alana kullandığınız karakterlerle giriş yapılamaz!"); return false; } } </script> </body></html><?php

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.01416.75
8.3.50.0040.01119.76
8.3.40.0090.00618.83
8.3.30.0030.01019.08
8.3.20.0040.00420.15
8.3.10.0060.00321.76
8.3.00.0050.00317.63
8.2.180.0120.00618.29
8.2.170.0120.00322.96
8.2.160.0140.00020.38
8.2.150.0090.00024.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0050.00321.15
8.2.110.0070.00321.06
8.2.100.0100.00318.05
8.2.90.0030.00619.41
8.2.80.0000.00817.97
8.2.70.0050.00517.72
8.2.60.0000.00818.03
8.2.50.0000.00818.07
8.2.40.0080.00018.34
8.2.30.0040.00418.12
8.2.20.0000.00717.80
8.2.10.0000.00718.13
8.2.00.0040.00417.86
8.1.270.0060.00323.79
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0070.01421.24
8.1.230.0050.00519.61
8.1.220.0030.00617.74
8.1.210.0040.00718.77
8.1.200.0040.00417.23
8.1.190.0050.00317.35
8.1.180.0030.00618.10
8.1.170.0060.00318.64
8.1.160.0070.00022.12
8.1.150.0040.00419.00
8.1.140.0000.00717.42
8.1.130.0030.00317.78
8.1.120.0050.00217.52
8.1.110.0040.00417.46
8.1.100.0040.00417.54
8.1.90.0000.00717.51
8.1.80.0040.00417.45
8.1.70.0030.00317.45
8.1.60.0050.00517.65
8.1.50.0050.00517.58
8.1.40.0040.00417.53
8.1.30.0090.00017.74
8.1.20.0030.00517.70
8.1.10.0040.00417.60
8.1.00.0060.00317.56
8.0.300.0080.00018.77
8.0.290.0070.00017.00
8.0.280.0040.00418.40
8.0.270.0050.00217.23
8.0.260.0040.00417.25
8.0.250.0000.00716.95
8.0.240.0030.00316.97
8.0.230.0030.00316.94
8.0.220.0000.00717.04
8.0.210.0070.00017.01
8.0.200.0070.00016.98
8.0.190.0000.00717.00
8.0.180.0070.00016.92
8.0.170.0000.00816.95
8.0.160.0030.00516.97
8.0.150.0070.00016.97
8.0.140.0060.00616.94
8.0.130.0030.00313.46
8.0.120.0040.00416.96
8.0.110.0000.00816.99
8.0.100.0000.00716.98
8.0.90.0040.00416.83
8.0.80.0080.00817.06
8.0.70.0020.00516.82
8.0.60.0040.00417.01
8.0.50.0030.00517.03
8.0.30.0130.00717.35
8.0.20.0120.00917.45
8.0.10.0070.00017.19
8.0.00.0080.01216.77
7.4.330.0030.00315.00
7.4.320.0060.00016.65
7.4.300.0030.00316.63
7.4.290.0040.00416.71
7.4.280.0040.00416.66
7.4.270.0000.00716.42
7.4.260.0000.00816.52
7.4.250.0040.00416.43
7.4.240.0020.00516.64
7.4.230.0070.00016.66
7.4.220.0110.00716.61
7.4.210.0070.01016.48
7.4.200.0000.00816.39
7.4.160.0040.01216.63
7.4.150.0130.01017.40
7.4.140.0070.01117.86
7.4.130.0070.01216.51
7.4.120.0100.00916.64
7.4.110.0100.01316.39
7.4.100.0090.00916.55
7.4.90.0170.00016.66
7.4.80.0150.00319.39
7.4.70.0150.00616.71
7.4.60.0110.00716.85
7.4.50.0000.00816.49
7.4.40.0100.01016.70
7.4.30.0130.00616.60
7.3.330.0030.00313.07
7.3.320.0050.00013.11
7.3.310.0000.00716.43
7.3.300.0000.00916.42
7.3.290.0030.01016.33
7.3.280.0070.01016.42
7.3.270.0210.00317.40
7.3.260.0130.01016.68
7.3.250.0110.00616.68
7.3.240.0100.01116.42
7.3.230.0040.01216.61
7.3.210.0090.01216.48
7.3.200.0100.01319.39
7.3.190.0090.00916.47
7.3.180.0110.00616.70
7.3.170.0130.00316.51
7.3.160.0060.01016.55
7.2.330.0140.00316.73
7.2.320.0070.01016.78
7.2.310.0070.01016.80
7.2.300.0170.00016.84
7.2.290.0140.00316.63
5.4.320.0070.03712.46
5.4.310.0060.03912.46
5.4.300.0070.03612.46
5.4.290.0100.03412.46
5.4.280.0050.03612.36
5.4.270.0090.03212.36
5.4.260.0060.03612.36
5.4.250.0060.03812.36
5.4.240.0090.03612.36
5.4.230.0070.03912.35
5.4.220.0070.03612.35
5.4.210.0050.03712.35
5.4.200.0070.03512.35
5.4.190.0060.03812.34
5.4.180.0080.04012.35
5.4.170.0060.03712.36
5.4.160.0060.03512.35
5.4.150.0060.04212.35
5.4.140.0050.04112.04
5.4.130.0050.03712.02
5.4.120.0070.03711.98
5.4.110.0060.03511.97
5.4.100.0070.03411.98
5.4.90.0030.03911.97
5.4.80.0070.03611.97
5.4.70.0080.03111.97
5.4.60.0090.03311.97
5.4.50.0050.03711.97
5.4.40.0070.03411.95
5.4.30.0050.03711.95
5.4.20.0090.03511.95
5.4.10.0040.03611.95
5.4.00.0040.04011.44
5.3.290.0040.04212.80
5.3.280.0080.03612.71
5.3.270.0080.03812.73
5.3.260.0110.03512.71
5.3.250.0070.03612.72
5.3.240.0080.03612.72
5.3.230.0080.03712.71
5.3.220.0060.03912.68
5.3.210.0090.03712.68
5.3.200.0060.03712.68
5.3.190.0060.03912.68
5.3.180.0050.03712.68
5.3.170.0110.03412.67
5.3.160.0070.03712.67
5.3.150.0080.03612.67
5.3.140.0060.03612.66
5.3.130.0040.04012.66
5.3.120.0030.04112.66
5.3.110.0050.04012.66
5.3.100.0030.04012.12
5.3.90.0040.03812.09
5.3.80.0030.03912.08
5.3.70.0050.03912.07
5.3.60.0060.03612.06
5.3.50.0070.03512.00
5.3.40.0050.03812.00
5.3.30.0040.03711.95
5.3.20.0070.03511.73
5.3.10.0030.03811.69
5.3.00.0110.03111.68
5.2.170.0030.0329.19
5.2.160.0040.0329.19
5.2.150.0030.0329.19
5.2.140.0070.0289.18
5.2.130.0040.0319.15
5.2.120.0090.0259.14
5.2.110.0090.0259.16
5.2.100.0050.0329.15
5.2.90.0040.0319.15
5.2.80.0070.0309.14
5.2.70.0090.0349.15
5.2.60.0070.0299.10
5.2.50.0050.0409.07
5.2.40.0070.0319.05
5.2.30.0060.0299.02
5.2.20.0080.0269.01
5.2.10.0040.0298.93
5.2.00.0080.0268.79
5.1.60.0050.0238.07
5.1.50.0060.0268.07
5.1.40.0080.0208.05
5.1.30.0030.0278.40
5.1.20.0050.0268.42
5.1.10.0050.0258.15
5.1.00.0070.0228.15
5.0.50.0050.0196.64
5.0.40.0030.0196.50
5.0.30.0040.0306.30
5.0.20.0030.0196.28
5.0.10.0050.0186.26
5.0.00.0040.0306.25
4.4.90.0050.0134.78
4.4.80.0030.0154.76
4.4.70.0020.0164.76
4.4.60.0040.0144.75
4.4.50.0020.0164.77
4.4.40.0020.0254.70
4.4.30.0030.0154.76
4.4.20.0060.0124.85
4.4.10.0020.0164.85
4.4.00.0060.0244.76
4.3.110.0010.0184.67
4.3.100.0040.0144.66
4.3.90.0000.0184.63
4.3.80.0020.0264.58
4.3.70.0030.0144.63
4.3.60.0030.0154.63
4.3.50.0070.0124.63
4.3.40.0050.0224.54
4.3.30.0020.0163.30
4.3.20.0010.0173.28
4.3.10.0040.0133.24
4.3.00.0000.01715.91

preferences:
41.52 ms | 400 KiB | 5 Q