3v4l.org

run code in 300+ PHP versions simultaneously
<header> <?php echo "<table class='navheader'><tr>"; include_once "../Shared/basic.php"; // As we always include the navheader - we can add the code that saves the current course ID to the session here. if(isset($_GET['courseid'])){ $_SESSION['courseid']=$_GET['courseid']; } if(isset($_GET['coursevers'])){ $_SESSION['coursevers']=$_GET['coursevers']; } // Always show home button which links to course homepage echo "<td class='navButt' id='home' title='Home'><a class='navButt' href='../DuggaSys/courseed.php'><img src='../Shared/icons/Home.svg'></a></td>"; // Generate different back buttons depending on which page is including // this file navheader file. The switch case uses ternary operators to // determine the href attribute value. (if(this) ? dothis : elsethis) //--------------------------------------------------------------------- echo "<td class='navButt' id='back' title='Back' onclick='window.history.back()'>"; echo "<img src='../Shared/icons/Up.svg'></td>"; if($noup=='COURSE'){ $cid=getOPG('cid'); if($cid=="UNK") $cid=getOPG('courseid'); $coursevers=getOPG('coursevers'); if($coursevers=="UNK") $coursevers=getOPG('cvers'); echo "<td class='navButt' id='swimlane' title='swimlane'>"; $path = getcwd() . "/swimlane.php?courseid=" . $cid . "&coursevers=" . $coursevers; echo "<a class ='linkSwimlane' href='JavaScript:void(0);'><img src='../Shared/icons/swimlane.svg'></a></td>"; } // Either generate code viewer specific nav menu or a spacer if(isset($codeviewer)){ echo "<td class='navButt' id='beforebutton' title='Previous example' onmousedown='Skip(\"bd\");' onmouseup='Skip(\"bu\");' onclick='Skip(\"b\");'><img src='../Shared/icons/backward_button.svg'></td>"; echo "<td class='navButt' id='afterbutton' title='Next example' onmousedown='Skip(\"fd\");' onmouseup='Skip(\"fu\");' onclick='Skip(\"f\");'><img src='../Shared/icons/forward_button.svg' /></td>"; echo "<td class='navButt' id='playbutton' title='Open demo' onclick='Play(event);'><img src='../Shared/icons/play_button.svg' /></td>"; if(checklogin()) { echo "<td class='navButt' id='templatebutton' title='Choose Template' onclick='openTemplateWindow();'><img src='../Shared/icons/choose_template.svg' /></td>"; echo "<td class='navButt' onclick='displayEditExample();' title='Example Settings' ><img src='../Shared/icons/general_settings_button.svg' /></td>"; echo "<td class='navButt' id='fileedButton' onclick='' style='display:none;' title='File Download/Upload' ><img src='../Shared/icons/files_icon.svg' /></td>"; } echo "<td class='navButt showmobile' style='display:none;'><a href='courseed.php'><img src='../Shared/icons/hotdog_button.svg'></a></td>"; echo "<td id='navHeading' class='navHeading codeheader'>"; echo "<span id='exampleSection'>Example Section : </span>"; echo "<span id='exampleName'> Example Name</span>"; echo "</td>"; }else{ echo "<td id='menuHook' class='navSpacer'></td>"; } if(checklogin()) { echo "<td class='navName'><a id='userName' href='profile.php'>".$_SESSION['loginname']."</a></td>"; echo "<td id='loginbutton' class='loggedin'><img id='loginbuttonIcon' onload='loginButtonHover(\"online\")' src='../Shared/icons/Man.svg' /></td>"; }else{ echo "<td class='navName'><label id='userName'>Guest</label></td>"; echo "<td id='loginbutton' class='loggedout'><img id='loginbuttonIcon' onload='loginButtonHover(\"offline\")' src='../Shared/icons/Man.svg' /></td>"; } echo "</tr></table>"; //Cookie message echo "<div id='cookiemsg'><p>This site uses cookies. By continuing to browse this page you accept the use of cookies.</p><input type='button' value='OK' class='submit-button' onclick='cookieMessage()'/></div>"; ?> </header> <body> <div class="swimlaneOverlay" id="swimlaneOverlay"> <!-- the external content of swimlane is loaded into this div --> <div class="SwimContentWrap" id ="SwimContentWrap"> <div class="SwimContent" id="SwimContent"> </div> <div class="SwimClose"> <span>&times;</span> </div> </div> </div> <script> var swimBox = document.getElementById('swimlaneOverlay'); var path = location.protocol + '//' + location.host + location.pathname; $(document).ready(function(){ $("a.linkSwimlane").click(function(){ loadSwimlane(); }); }); function loadSwimlane() { $('.SwimContent').load(path + "/../../Shared/swimlane.php?courseid=" + <?php ((isset($cid)) ? Print($cid) : Print(0)) ?> + "&coursevers=" + <?php ((isset($coursevers)) ? Print($coursevers) : Print(0)) ?>); swimBox.style.display = "block"; } var circlePosX; var circlePosY; var mouseX; var mouseY; /* Get mouse position. */ $(document).mousemove(function (e) { mouseX = e.pageX; mouseY = e.pageY; }); /* Move left column with side scroll. */ $(window).scroll(function () { $('#weeks').css({ 'left': $(this).scrollLeft() }); }); function mouseOverCircle(circle, text) { circle.setAttribute("r", 15); circlePosY = parseInt(circle.getAttribute('cy')) - 70; circlePosX = parseInt(circle.getAttribute('cx')) + 20; document.getElementById("duggaInfoText").innerHTML = text; $('#duggainfo').css({'top': circlePosY, 'left': circlePosX}).fadeIn('fast'); } function mouseGoneFromCircle(circle) { circle.setAttribute("r", 10); $('#duggainfo').fadeOut('fast'); } function mouseOverLine(text) { document.getElementById("currentDateText").innerHTML = text; $('#currentDate').css({'top': mouseY, 'left': mouseX}).fadeIn('fast'); } function mouseGoneFromLine() { $('#currentDate').fadeOut('fast'); } var exitButton = document.getElementsByClassName("SwimClose")[0]; /* Get the button that opens the modal */ /* When the user clicks on <span> (x), close the modal */ exitButton.onclick = function() { swimBox.style.display = "none"; } /* When the user clicks anywhere outside of the modal, close it */ window.onclick = function(event) { if (event.target == swimBox) { swimBox.style.display = "none"; } } </script> </body> <script type="text/javascript"> if(localStorage.getItem("cookieMessage")=="off"){ $("#cookiemsg").css("display", "none"); } else{ $("#cookiemsg").css("display", "flex"); } setupLoginLogoutButton('<?PHP echo json_encode(checklogin()) ?>'); function cookieMessage(){ localStorage.setItem("cookieMessage", "off"); $("#cookiemsg").css("display", "none"); } </script>

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.00818.68
8.3.50.0130.00316.42
8.3.40.0150.00018.98
8.3.30.0040.01118.80
8.3.20.0040.00420.21
8.3.10.0000.00821.69
8.3.00.0050.00322.43
8.2.180.0100.01016.50
8.2.170.0120.00322.96
8.2.160.0030.01019.29
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00020.52
8.2.120.0040.00426.35
8.2.110.0030.00721.18
8.2.100.0040.00820.53
8.2.90.0080.00019.48
8.2.80.0030.00617.97
8.2.70.0050.00317.93
8.2.60.0040.00418.22
8.2.50.0000.00719.21
8.2.40.0000.00820.51
8.2.30.0000.00819.26
8.2.20.0060.00318.23
8.2.10.0040.00418.25
8.2.00.0050.00318.39
8.1.280.0140.00325.92
8.1.270.0070.00022.26
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00322.32
8.1.230.0120.00020.92
8.1.220.0090.00017.74
8.1.210.0050.00318.77
8.1.200.0050.00517.48
8.1.190.0090.00017.48
8.1.180.0030.00618.10
8.1.170.0100.00318.54
8.1.160.0040.00418.95
8.1.150.0000.00720.27
8.1.140.0070.00019.54
8.1.130.0070.00017.37
8.1.120.0040.00417.53
8.1.110.0000.00917.44
8.1.100.0080.00017.32
8.1.90.0030.00517.44
8.1.80.0000.00717.36
8.1.70.0000.00717.42
8.1.60.0000.00817.64
8.1.50.0080.00017.50
8.1.40.0080.00017.47
8.1.30.0080.00017.67
8.1.20.0030.00617.68
8.1.10.0030.00617.68
8.1.00.0040.00417.49
8.0.300.0040.00419.91
8.0.290.0000.00916.75
8.0.280.0040.00418.61
8.0.270.0070.00017.38
8.0.260.0030.00317.01
8.0.250.0030.00317.06
8.0.240.0040.00417.03
8.0.230.0000.00817.16
8.0.220.0070.00017.13
8.0.210.0030.00316.95
8.0.200.0020.00517.15
8.0.190.0060.00317.17
8.0.180.0080.00017.09
8.0.170.0050.00217.13
8.0.160.0040.00417.07
8.0.150.0000.00716.91
8.0.140.0050.00517.07
8.0.130.0060.00013.46
8.0.120.0000.00816.98
8.0.110.0040.00416.97
8.0.100.0000.00816.96
8.0.90.0000.00816.96
8.0.80.0120.00916.95
8.0.70.0040.00417.13
8.0.60.0070.00017.10
8.0.50.0020.00517.09
8.0.30.0120.00816.94
8.0.20.0100.00917.40
8.0.10.0040.00416.97
8.0.00.0090.00916.79
7.4.330.0030.00315.55
7.4.320.0000.00616.52
7.4.300.0000.00716.56
7.4.290.0040.00416.54
7.4.280.0040.00416.46
7.4.270.0070.00016.46
7.4.260.0050.00216.65
7.4.250.0070.00016.56
7.4.240.0040.00316.70
7.4.230.0030.00316.64
7.4.220.0140.00416.55
7.4.210.0080.00816.64
7.4.200.0040.00416.71
7.4.160.0070.01416.61
7.4.150.0090.00917.40
7.4.140.0130.00517.86
7.4.130.0110.01216.71
7.4.120.0150.00816.58
7.4.110.0160.00016.55
7.4.100.0070.01116.55
7.4.90.0070.01016.64
7.4.80.0110.00819.39
7.4.70.0080.00816.60
7.4.60.0100.00716.54
7.4.50.0060.00616.55
7.4.40.0070.01116.32
7.4.30.0140.00416.70
7.4.10.0090.00915.00
7.4.00.0030.01214.77
7.3.330.0060.00013.34
7.3.320.0030.00313.31
7.3.310.0030.00516.40
7.3.300.0070.00016.57
7.3.290.0120.00316.46
7.3.280.0090.00816.49
7.3.270.0060.01317.40
7.3.260.0100.00816.51
7.3.240.0090.00816.55
7.3.230.0110.00816.55
7.3.210.0070.01016.50
7.3.200.0080.00816.47
7.3.190.0100.00716.39
7.3.180.0070.01016.66
7.3.170.0100.00716.64
7.3.160.0100.00616.62
7.3.130.0100.01015.16
7.3.120.0100.01014.71
7.3.110.0040.01514.83
7.3.100.0100.00615.00
7.3.90.0030.01215.20
7.3.80.0030.01015.08
7.3.70.0030.01014.67
7.3.60.0130.00314.96
7.3.50.0100.00314.89
7.3.40.0030.01015.04
7.3.30.0060.00914.59
7.3.20.0000.01416.86
7.3.10.0000.01516.77
7.3.00.0000.01016.82
7.2.330.0100.00716.75
7.2.320.0100.00716.68
7.2.310.0040.01816.48
7.2.300.0070.01016.87
7.2.290.0070.01416.71
7.2.260.0060.01214.97
7.2.250.0140.00315.14
7.2.240.0100.00315.23
7.2.230.0090.00615.10
7.2.220.0000.01815.18
7.2.210.0030.00714.84
7.2.200.0030.00715.12
7.2.190.0090.00615.04
7.2.180.0060.01214.76
7.2.170.0030.00915.13
7.2.160.0040.00715.23
7.2.150.0060.00616.64
7.2.140.0000.01616.98
7.2.130.0100.00716.93
7.2.120.0030.01017.09
7.2.110.0090.00716.70
7.2.100.0080.00816.90
7.2.90.0030.01016.89
7.2.80.0040.01116.88
7.2.70.0090.00916.94
7.2.60.0070.00616.69
7.2.50.0040.00716.92
7.2.40.0060.00316.73
7.2.30.0090.00917.08
7.2.20.0130.00317.03
7.2.10.0100.00716.93
7.2.00.0140.00016.73
7.1.330.0080.00315.77
7.1.320.0070.01115.77
7.1.310.0090.00615.56
7.1.300.0070.00415.66
7.1.290.0090.00915.52
7.1.280.0060.01015.73
7.1.270.0030.00915.55
7.1.260.0120.00315.73
7.1.250.0030.01015.45
7.1.240.0000.01515.80
7.1.230.0080.00515.59
7.1.220.0070.01115.89
7.1.210.0040.00715.80
7.1.200.0090.00315.67
7.1.190.0040.01115.52
7.1.180.0040.00715.96
7.1.170.0000.00915.92
7.1.160.0030.01015.84
7.1.150.0000.01315.82
7.1.140.0060.00315.64
7.1.130.0070.01015.83
7.1.120.0090.00915.73
7.1.110.0110.00415.88
7.1.100.0080.00315.91
7.1.90.0030.00916.02
7.1.80.0040.01115.86
7.1.70.0060.00916.40
7.1.60.0070.00316.42
7.1.50.0080.05128.22
7.1.40.0100.01024.95
7.1.30.0050.01624.96
7.1.20.0140.00725.09
7.1.10.0080.00816.08
7.1.00.0090.00716.29
7.0.330.0040.00715.18
7.0.320.0070.00715.35
7.0.310.0100.00315.42
7.0.300.0000.01215.14
7.0.290.0030.01315.27
7.0.280.0030.01315.44
7.0.270.0060.00615.13
7.0.260.0080.00815.30
7.0.250.0030.00915.32
7.0.240.0090.00315.06
7.0.230.0120.00415.43
7.0.220.0040.01115.52
7.0.210.0050.00315.35
7.0.200.0040.01416.00
7.0.190.0050.05018.81
7.0.180.0090.00715.70
7.0.170.0090.00315.86
7.0.160.0050.00715.60
7.0.150.0070.00715.67
7.0.140.0030.00815.76
7.0.130.0030.01215.81
7.0.120.0070.00815.76
7.0.110.0060.00715.77
7.0.100.0030.01315.68
7.0.90.0020.00915.77
7.0.80.0070.00715.62
7.0.70.0050.01115.56
7.0.60.0620.01015.68
7.0.50.0050.01015.88
7.0.40.0020.01314.98
7.0.30.0050.00814.76
7.0.20.0060.00714.88
7.0.10.0030.01114.92
7.0.00.0030.00914.90
5.6.400.0000.01114.22
5.6.390.0060.00614.34
5.6.380.0000.01614.09
5.6.370.0060.01014.28
5.6.360.0030.01014.42
5.6.350.0060.00914.35
5.6.340.0050.00614.40
5.6.330.0030.01214.20
5.6.320.0040.01114.57
5.6.310.0090.00314.43
5.6.300.0000.00914.59
5.6.290.0110.00314.43
5.6.280.0060.00614.53
5.6.270.0030.00714.56
5.6.260.0100.00314.44
5.6.250.0080.00414.37
5.6.240.0110.00314.33
5.6.230.0080.00614.61
5.6.220.0030.00714.28
5.6.210.0000.01014.34
5.6.200.0090.00914.39
5.6.190.0000.01414.55
5.6.180.0080.00414.55
5.6.170.0040.00814.27
5.6.160.0090.00314.27
5.6.150.0080.00414.50
5.6.140.0030.01014.57
5.6.130.0100.00714.38
5.6.120.0090.00614.27
5.6.110.0070.00714.15
5.6.100.0090.00314.49
5.6.90.0050.00814.59
5.6.80.0040.00714.35
5.6.70.0060.00614.55
5.6.60.0050.00514.25
5.6.50.0050.00514.34
5.6.40.0040.01114.45
5.6.30.0070.00714.45
5.6.20.0090.00614.14
5.6.10.0000.01514.50
5.6.00.0030.01014.16

preferences:
67.56 ms | 401 KiB | 5 Q