3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE> <html> <head> <title> Zodiac </title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="zodiac.js"></script> </head> <body> <h1>What is your Zodiac Sign?</h1> <p>Enter your name and birthdate below to discover your zodiac sign!</p> <form action="zodiac.php" method="get"> <?php //ini_set("display_errors", 1); function findSign($name, $month, $date){ $intDate = intval($date); switch($month){ case "January": echo "January"; if($intDate <= 19){ echo "$name are a Capricorn"; } else{ echo "$name are a Aquarius"; } break; default: break; } } if(isset($_POST['submit'])){ $name = $_POST['name']; $month = $_POST['month']; $day = $_POST['day']; $year = $_POST['year']; echo "hi"; } ?> <input type="text" name="name" placeholder="Name" value="<?php echo $name; ?>" /> <br /> <?php //variables for year $startYear = 1950; $endYear = 2014; //making drop down menu for year echo '<select name="year" id="year">'; echo '<option value="">--Birth Year--</option>'; for(; $startYear <= $endYear; $startYear++){ echo '<option value="' . $startYear . '">' . $startYear . '</option>'; } echo '</select>'; //array list of strings for the months $month = array( "--Birth Month--", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ); //making a drop down menu for months echo '<select name="month" id="month">'; //echo '<option value="">--Birth Month--</option>'; for($i = 0; $i < count($month); $i++){ echo '<option value="' . $month[$i] . '">' . $month[$i] . '</option>'; } echo '</select>'; //variables for the day $startDay = 1; $endDay = 31; //making drop down menu for day echo '<select name="day" id="day">'; echo '<option value="">--Birth Day--</option>'; for(; $startDay <= $endDay; $startDay++){ echo '<option value="' . $startDay; if($day == $startDay){ echo 'checked="checked"'; } echo '">' . $startDay . '</option>'; } echo '</select>'; ?> <br /> <input type="submit" value="Submit" name="submit" /> <?php } ?> </form> </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)
5.4.320.0060.03912.54
5.4.310.0050.04612.53
5.4.300.0090.04312.54
5.4.290.0080.04012.53
5.4.280.0070.04312.42
5.4.270.0070.03512.43
5.4.260.0090.03412.42
5.4.250.0070.03612.42
5.4.240.0050.03712.42
5.4.230.0060.03712.41
5.4.220.0110.03912.42
5.4.210.0080.04112.42
5.4.200.0080.04012.41
5.4.190.0050.04212.41
5.4.180.0060.04212.41
5.4.170.0060.04612.41
5.4.160.0050.03912.41
5.4.150.0050.04112.41
5.4.140.0040.04312.10
5.4.130.0080.03712.08
5.4.120.0100.03412.05
5.4.110.0080.03612.04
5.4.100.0070.04712.04
5.4.90.0090.03612.04
5.4.80.0060.04412.04
5.4.70.0100.03712.04
5.4.60.0060.04012.04
5.4.50.0060.03812.04
5.4.40.0120.03312.03
5.4.30.0060.03512.02
5.4.20.0070.03712.02
5.4.10.0070.03512.02
5.4.00.0050.03911.52
5.3.290.0100.04612.80
5.3.280.0070.04012.71
5.3.270.0100.03612.72
5.3.260.0070.04312.71
5.3.250.0080.03812.72
5.3.240.0100.04212.72
5.3.230.0050.04412.71
5.3.220.0070.03912.68
5.3.210.0050.04612.68
5.3.200.0090.03712.68
5.3.190.0070.04312.68
5.3.180.0070.04512.68
5.3.170.0050.04312.66
5.3.160.0060.03712.67
5.3.150.0060.04212.67
5.3.140.0070.03712.66
5.3.130.0070.03812.66
5.3.120.0080.04012.66
5.3.110.0100.03512.66
5.3.100.0080.03612.13
5.3.90.0110.03212.12
5.3.80.0080.03512.11
5.3.70.0080.03712.11
5.3.60.0100.03412.09
5.3.50.0060.03612.04
5.3.40.0060.03712.04
5.3.30.0080.03412.00
5.3.20.0110.03511.79
5.3.10.0030.03811.75
5.3.00.0090.03811.73
5.2.170.0090.0279.24
5.2.160.0090.0399.24
5.2.150.0080.0359.23
5.2.140.0040.0329.24
5.2.130.0060.0289.20
5.2.120.0040.0379.19
5.2.110.0040.0319.20
5.2.100.0070.0329.20
5.2.90.0040.0339.20
5.2.80.0100.0359.19
5.2.70.0010.0349.20
5.2.60.0040.0309.15
5.2.50.0050.0319.12
5.2.40.0070.0339.09
5.2.30.0070.0309.07
5.2.20.0070.0329.06
5.2.10.0060.0368.97
5.2.00.0090.0298.83
5.1.60.0040.0258.12
5.1.50.0080.0308.11
5.1.40.0030.0268.08
5.1.30.0050.0288.44
5.1.20.0070.0258.46
5.1.10.0090.0308.19
5.1.00.0070.0238.19
5.0.50.0040.0206.67
5.0.40.0040.0206.53
5.0.30.0050.0296.34
5.0.20.0030.0206.30
5.0.10.0040.0216.28
5.0.00.0050.0366.28
4.4.90.0060.0154.77
4.4.80.0050.0164.75
4.4.70.0010.0204.76
4.4.60.0060.0264.76
4.4.50.0040.0164.77
4.4.40.0050.0264.71
4.4.30.0060.0194.76
4.4.20.0030.0164.85
4.4.10.0060.0154.85
4.4.00.0020.0264.76
4.3.110.0020.0164.67
4.3.100.0040.0134.66
4.3.90.0020.0154.63
4.3.80.0060.0214.58
4.3.70.0050.0184.63
4.3.60.0030.0164.63
4.3.50.0040.0174.63
4.3.40.0020.0334.54
4.3.30.0030.0243.32
4.3.20.0050.0223.30
4.3.10.0020.0213.26
4.3.00.0070.01313.57

preferences:
156.37 ms | 1394 KiB | 7 Q