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)
8.3.60.0090.00916.88
8.3.50.0130.00722.05
8.3.40.0150.00018.76
8.3.30.0110.00719.23
8.3.20.0000.00720.33
8.3.10.0050.00320.48
8.3.00.0000.00819.13
8.2.180.0080.00816.63
8.2.170.0100.00722.96
8.2.160.0040.01120.39
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00421.16
8.2.110.0100.00021.10
8.2.100.0040.00817.97
8.2.90.0000.00820.50
8.2.80.0090.00018.16
8.2.70.0040.00418.05
8.2.60.0000.01018.05
8.2.50.0030.00618.10
8.2.40.0070.00318.34
8.2.30.0040.00419.54
8.2.20.0040.00417.98
8.2.10.0000.00718.03
8.2.00.0040.00417.89
8.1.280.0110.01125.92
8.1.270.0060.00323.96
8.1.260.0090.00026.35
8.1.250.0030.00528.09
8.1.240.0050.00522.58
8.1.230.0060.00620.91
8.1.220.0000.01017.74
8.1.210.0030.00518.89
8.1.200.0040.00417.35
8.1.190.0030.00617.36
8.1.180.0080.00018.10
8.1.170.0000.00818.73
8.1.160.0000.00822.04
8.1.150.0000.00718.89
8.1.140.0000.00717.50
8.1.130.0000.00717.88
8.1.120.0000.00717.40
8.1.110.0040.00417.41
8.1.100.0040.00417.43
8.1.90.0050.00217.56
8.1.80.0030.00617.50
8.1.70.0000.00717.50
8.1.60.0030.00617.55
8.1.50.0000.00917.60
8.1.40.0080.00017.54
8.1.30.0040.00417.59
8.1.20.0080.00017.69
8.1.10.0000.00817.53
8.1.00.0000.00817.59
8.0.300.0020.00520.07
8.0.290.0030.00616.88
8.0.280.0000.00718.41
8.0.270.0030.00617.18
8.0.260.0070.00017.30
8.0.250.0050.00317.09
8.0.240.0000.00617.08
8.0.230.0000.00817.11
8.0.220.0030.00317.03
8.0.210.0040.00417.05
8.0.200.0000.00617.04
8.0.190.0050.00217.08
8.0.180.0000.00816.91
8.0.170.0040.00417.00
8.0.160.0070.00017.01
8.0.150.0030.00516.81
8.0.140.0040.00417.02
8.0.130.0030.00313.37
8.0.120.0030.00616.98
8.0.110.0070.00016.93
8.0.100.0020.00517.04
8.0.90.0050.00216.95
8.0.80.0060.01117.02
8.0.70.0030.00617.05
8.0.60.0000.00817.01
8.0.50.0000.00717.07
8.0.30.0120.01217.14
8.0.20.0160.01017.40
8.0.10.0040.00416.93
8.0.00.0100.00816.76
7.4.330.0000.00615.00
7.4.320.0030.00316.68
7.4.300.0070.00016.65
7.4.290.0000.00716.69
7.4.280.0030.00616.44
7.4.270.0030.00316.41
7.4.260.0030.00316.46
7.4.250.0000.00816.48
7.4.240.0050.00216.57
7.4.230.0000.00716.54
7.4.220.0110.00716.59
7.4.210.0000.02116.73
7.4.200.0030.00316.41
7.4.160.0140.00316.44
7.4.150.0150.01017.40
7.4.140.0130.00917.86
7.4.130.0120.00916.56
7.4.120.0120.00816.56
7.4.110.0100.00616.49
7.4.100.0110.00716.75
7.4.90.0070.01016.62
7.4.80.0080.01219.39
7.4.70.0070.01416.50
7.4.60.0080.01116.64
7.4.50.0040.00416.65
7.4.40.0100.00716.34
7.4.30.0090.01416.63
7.4.00.0080.00915.16
7.3.330.0000.00513.34
7.3.320.0050.00213.41
7.3.310.0030.00316.42
7.3.300.0030.00316.43
7.3.290.0140.00716.44
7.3.280.0090.00716.37
7.3.270.0150.00917.40
7.3.260.0140.00316.54
7.3.250.0110.01116.60
7.3.240.0090.01616.63
7.3.230.0070.01016.48
7.3.210.0130.01016.49
7.3.200.0150.00619.39
7.3.190.0090.00916.69
7.3.180.0140.00316.43
7.3.170.0100.00816.72
7.3.160.0110.00816.45
7.3.120.0090.00814.94
7.3.110.0090.00915.08
7.3.100.0080.00815.01
7.3.90.0070.00614.83
7.3.80.0070.00715.01
7.3.70.0050.00714.92
7.3.60.0090.00514.85
7.3.50.0030.01214.90
7.3.40.0040.00914.98
7.3.30.0040.00814.78
7.3.20.0090.00616.70
7.3.10.0060.00616.64
7.3.00.0050.00816.68
7.2.330.0200.00316.83
7.2.320.0070.01816.86
7.2.310.0190.00016.73
7.2.300.0060.01216.74
7.2.290.0120.00616.86
7.2.250.0080.01015.18
7.2.240.0090.01115.17
7.2.230.0070.00815.07
7.2.220.0040.00915.25
7.2.210.0050.00815.11
7.2.200.0070.00814.97
7.2.190.0070.00915.05
7.2.180.0030.01115.18
7.2.170.0070.00715.15
7.2.00.0090.00619.33
7.1.330.0060.01015.80
7.1.320.0070.00615.86
7.1.310.0060.00915.87
7.1.300.0090.00415.77
7.1.290.0100.00215.89
7.1.280.0080.00415.73
7.1.270.0090.00315.91
7.1.260.0050.00615.87
7.1.100.0060.00618.14
7.1.70.0040.00417.35
7.1.60.0070.01719.61
7.1.50.0120.01216.87
7.1.00.0000.08022.45
7.0.200.0030.00616.68
7.0.140.0030.07722.05
7.0.60.0100.08719.88
7.0.50.0070.04017.90
7.0.40.0000.06020.27
7.0.30.0200.05720.23
7.0.20.0300.05020.23
7.0.10.0230.08020.09
7.0.00.0130.03320.14
5.6.280.0000.07321.09
5.6.210.0130.05720.49
5.6.200.0070.05018.22
5.6.190.0100.06720.61
5.6.180.0170.04720.50
5.6.170.0270.07720.57
5.6.160.0030.04320.57
5.6.150.0100.07718.21
5.6.140.0000.05718.24
5.6.130.0170.07018.13
5.6.120.0100.07021.06
5.6.110.0130.08721.16
5.6.100.0100.08721.02
5.6.90.0070.08021.00
5.6.80.0130.07320.42
5.6.70.4370.03320.38
5.5.350.0200.06720.30
5.5.340.0070.07017.98
5.5.330.0070.09020.35
5.5.320.0430.07020.36
5.5.310.0230.04020.36
5.5.300.0070.04717.97
5.5.290.0030.07717.98
5.5.280.0030.04320.66
5.5.270.0100.05720.85
5.5.260.0030.07320.69
5.5.250.0030.05720.70
5.5.240.2300.05720.27
5.4.450.3300.02719.44
5.4.440.0070.04019.54
5.4.430.1470.05019.54
5.4.420.3800.04019.54
5.4.410.0030.05719.41
5.4.400.3900.04018.94
5.4.390.3970.04718.93
5.4.380.4100.04018.95
5.4.370.3700.04319.20
5.4.360.3830.03319.22
5.4.350.0100.03319.17
5.4.340.0330.04719.06
5.4.320.4570.03719.10
5.4.310.4400.04719.13
5.4.300.3630.04318.98
5.4.290.4000.04018.93
5.4.280.4030.03718.93
5.4.270.3900.03719.20
5.4.260.4500.03719.14
5.4.250.4130.03019.21
5.4.240.3700.04318.94
5.4.230.3900.04019.21
5.4.220.3830.04019.10
5.4.210.3730.03719.17
5.4.200.4530.03019.21
5.4.190.3530.03719.11
5.4.180.3570.04019.21
5.4.170.3600.04019.11
5.4.160.3570.03319.05
5.4.150.3730.03719.19
5.4.140.3330.04016.27
5.4.130.4000.03316.49
5.4.120.3570.03716.34
5.4.110.3770.03716.55
5.4.100.3600.03316.54
5.4.90.3930.03016.26
5.4.80.3830.03316.43
5.4.70.3600.03316.34
5.4.60.3770.03016.21
5.4.50.3870.03016.49
5.4.40.3870.03316.51
5.4.30.4430.03316.23
5.4.20.3770.04016.53
5.4.10.4330.03716.48
5.4.00.4530.03315.96
5.3.290.4370.04314.70
5.3.280.3930.03314.68
5.3.270.3600.03714.78
5.3.260.4000.03714.68
5.3.250.4000.03314.62
5.3.240.3930.03314.69
5.3.230.3400.04714.64
5.3.220.3870.03014.59
5.3.210.3830.04014.48
5.3.200.3970.03714.59
5.3.190.3230.04014.73
5.3.180.3630.04314.60
5.3.170.3770.04714.58
5.3.160.3800.03714.60
5.3.150.3470.03314.50
5.3.140.3770.03314.60
5.3.130.4530.04314.61
5.3.120.4370.04714.63
5.3.110.4100.04014.64
5.3.100.4400.04014.04
5.3.90.4370.03714.07
5.3.80.4030.03014.10
5.3.70.4530.03014.02
5.3.60.4430.04314.02
5.3.50.4270.02714.03
5.3.40.2130.02713.98
5.3.30.1900.03713.93
5.3.20.2600.03313.71
5.3.10.2430.03713.71
5.3.00.3130.03313.71
5.2.170.3830.03011.31
5.2.160.2870.03011.32
5.2.150.1530.03311.10
5.2.140.2000.03311.21
5.2.130.2470.03011.16
5.2.120.2830.03011.12
5.2.110.2500.02711.27
5.2.100.2300.03011.04
5.2.90.2400.03311.11
5.2.80.2870.03311.26
5.2.70.1600.03311.25
5.2.60.1600.03011.21
5.2.50.1100.03011.00
5.2.40.1500.02710.90
5.2.30.0370.02710.98
5.2.20.1100.03010.93
5.2.10.1570.03010.92
5.2.00.2000.03010.70
5.1.60.1930.02310.09
5.1.50.2670.02310.02
5.1.40.2830.0239.96
5.1.30.2570.02710.50
5.1.20.2670.03310.40
5.1.10.2600.03010.00
5.1.00.2330.02310.25
5.0.50.1300.0209.16
5.0.40.1270.0239.16
5.0.30.1300.0309.16
5.0.20.1430.0209.16
5.0.10.1800.0239.16
5.0.00.1630.0439.16
4.4.90.0430.0209.16
4.4.80.0230.0179.16
4.4.70.0400.0179.16
4.4.60.0330.0139.16
4.4.50.0670.0109.16
4.4.40.1170.0309.16
4.4.30.1400.0179.16
4.4.20.1370.0209.16
4.4.10.1230.0179.16
4.4.00.1470.0309.16
4.3.110.1430.0209.16
4.3.100.1600.0179.16
4.3.90.1770.0139.16
4.3.80.1570.0239.16
4.3.70.1600.0179.16
4.3.60.1530.0139.16
4.3.50.1470.0139.16
4.3.40.1430.0239.16
4.3.30.0930.0209.16
4.3.20.0870.0209.16
4.3.10.1070.0239.16
4.3.00.0930.0239.16

preferences:
54.29 ms | 400 KiB | 5 Q