3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head> <title>TimeGame</title> <link href="css and images/forms.css" rel="stylesheet" type="text/css" /> <link href="css and images/style.css" rel="stylesheet" type="text/css" /> </head> <body id="bdy"> <div id="formdiv"> <div id="innerdiv"> <p id="para">Enter Unixtimestamp</p> <form action="q3.php" method="post"> <label for="name">TimeStamp</label><br> <input name="timestamp" placeholder="Timestamp" /> <p class="small">Current Timestamp will be taken by default.</p> <input type="submit" class="awesome" value="Submit" /> </form> </div> <div id="tablediv"> <?php if(isset($_POST["timestamp"])) { ?> <br> <table> <thead> <tr> <th>Format</th> <th>Date</th> </tr> </thead> <tbody> <tr> <?php if ($_POST["timestamp"]==null) { $t = getdate(); } else { $t = getdate($_POST["timestamp"]); } ?> <td>Y-m-d H:i:s</td> <td><?php if ($t['hours']<10) $t['hours']="0".$t['hours']; if ($t['minutes']<10) $t['minutes']="0".$t['minutes']; if ($t['seconds']<10) $t['seconds']="0".$t['seconds']; if ($t['year']<10) $t['year']="0".$t['year']; if ($t['mon']<10) $t['mon']="0".$t['mon']; if ($t['mday']<10) $t['mday']="0".$t['mday']; echo $t['year']."-".$t['mon']."-".$t['mday']." ".$t['hours'].":".$t['minutes'].":".$t['seconds']; ?></td> </tr> <tr> <?php if ($_POST["timestamp"]==null) { $t = getdate(); } else { $t = getdate($_POST["timestamp"]); } ?> <td>Y-m-d</td> <td><?php if ($t['hours']<10) $t['hours']="0".$t['hours']; if ($t['minutes']<10) $t['minutes']="0".$t['minutes']; if ($t['seconds']<10) $t['seconds']="0".$t['seconds']; if ($t['year']<10) $t['year']="0".$t['year']; if ($t['mon']<10) $t['mon']="0".$t['mon']; if ($t['mday']<10) $t['mday']="0".$t['mday']; echo $t['year']."-".$t['mon']."-".$t['mday']; ?></td> </tr> <tr> <?php if ($_POST["timestamp"]==null) { $t = getdate(); } else { $t = getdate($_POST["timestamp"]); } ?> <td>m/d/Y H:i:s</td> <td><?php if ($t['hours']<10) $t['hours']="0".$t['hours']; if ($t['minutes']<10) $t['minutes']="0".$t['minutes']; if ($t['seconds']<10) $t['seconds']="0".$t['seconds']; if ($t['year']<10) $t['year']="0".$t['year']; if ($t['mon']<10) $t['mon']="0".$t['mon']; if ($t['mday']<10) $t['mday']="0".$t['mday']; echo $t['mon']."/".$t['mday']."/".$t['year']." ".$t['hours'].":".$t['minutes'].":".$t['seconds']; ?></td> </tr> <tr> <?php if ($_POST["timestamp"]==null) { $t = getdate(); } else { $t = getdate($_POST["timestamp"]); } ?> <td>m/d/Y</td> <td><?php if ($t['hours']<10) $t['hours']="0".$t['hours']; if ($t['minutes']<10) $t['minutes']="0".$t['minutes']; if ($t['seconds']<10) $t['seconds']="0".$t['seconds']; if ($t['year']<10) $t['year']="0".$t['year']; if ($t['mon']<10) $t['mon']="0".$t['mon']; if ($t['mday']<10) $t['mday']="0".$t['mday']; echo $t['mon']."/".$t['mday']."/".$t['year']; ?></td> </tr> </tbody> </table> </div> </div> <?php $time1=$_POST["timestamp"]; $time2=time(); if ($time1==null) { ?><p class="endp"><?php echo "Difference between Your input and Current time stamp is : 0";?></p><?php } else { ?><p class="endp"><?php echo "Difference between Your input and Current time stamp is : ".($time2-$time1);?></p><?php } } ?> </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)
7.4.00.0040.01115.09
7.3.120.0040.01414.84
7.3.110.0080.00814.74
7.3.100.0030.00914.60
7.3.90.0090.00915.04
7.3.80.0030.01215.00
7.3.70.0090.00314.69
7.3.60.0060.00914.62
7.3.50.0030.00914.66
7.3.40.0030.01214.84
7.3.30.0030.01215.08
7.3.20.0040.00716.65
7.3.10.0060.00516.37
7.3.00.0080.00616.23
7.2.250.0040.00814.93
7.2.240.0030.01614.66
7.2.230.0080.00414.72
7.2.220.0060.00614.96
7.2.210.0100.00315.09
7.2.200.0100.00315.13
7.2.190.0030.01015.12
7.2.180.0090.00614.98
7.2.170.0070.01114.91
7.2.130.0080.00616.72
7.2.120.0090.00416.71
7.2.110.0050.00816.36
7.2.100.0090.00616.73
7.2.90.0050.01316.67
7.2.80.0080.00816.72
7.2.70.0060.01016.63
7.2.60.0090.00616.74
7.2.50.0100.00716.76
7.2.40.0100.00716.75
7.2.30.0120.00516.46
7.2.20.0100.00716.49
7.2.10.0080.00616.60
7.2.00.0100.00416.87
7.1.330.0030.01215.79
7.1.320.0000.01315.63
7.1.310.0030.00615.76
7.1.300.0070.00715.74
7.1.290.0000.01415.84
7.1.280.0110.00415.48
7.1.270.0000.01715.32
7.1.260.0090.00615.67
7.1.250.0060.01015.24
7.1.240.0030.00615.85
7.1.230.0040.00815.73
7.1.220.0090.00015.60
7.1.210.0030.00915.65
7.1.200.0030.00915.77
7.1.190.0030.00915.68
7.1.180.0060.00315.63
7.1.170.0070.00715.63
7.1.160.0040.00815.67
7.1.150.0040.00815.70
7.1.140.0040.00715.51
7.1.130.0000.01115.28
7.1.120.0030.00915.30
7.1.110.0030.01215.85
7.1.100.0040.00415.68
7.1.90.0030.01015.69
7.1.80.0070.00715.81
7.1.70.0050.00516.28
7.1.60.0050.00716.54
7.1.50.0120.00315.99
7.1.40.0040.01115.36
7.1.30.0070.00315.38
7.1.20.0000.01515.64
7.1.10.0000.01015.61
7.1.00.0060.01819.11
7.0.330.0040.01115.01
7.0.320.0000.01314.84
7.0.310.0040.01115.29
7.0.300.0040.00715.41
7.0.290.0040.00414.86
7.0.280.0030.00715.08
7.0.270.0040.00715.27
7.0.260.0030.00615.19
7.0.250.0070.00715.05
7.0.240.0040.00815.12
7.0.230.0080.00015.44
7.0.220.0030.00715.07
7.0.210.0030.00615.25
7.0.200.0050.00515.83
7.0.190.0030.00715.03
7.0.180.0000.01115.16
7.0.170.0040.01215.34
7.0.160.0030.00914.88
7.0.150.0070.00315.18
7.0.140.0070.03718.66
7.0.130.0060.00615.16
7.0.120.0090.00315.23
7.0.110.0090.00615.09
7.0.100.0070.00315.27
7.0.90.0080.00815.37
7.0.80.0120.04317.68
7.0.70.0080.02817.71
7.0.60.0070.04417.64
7.0.50.0080.04517.82
7.0.40.0110.04316.66
7.0.30.0030.03316.65
7.0.20.0110.04016.62
7.0.10.0120.03816.66
7.0.00.0030.03516.66
5.6.380.0060.00614.17
5.6.370.0030.00614.53
5.6.360.0080.00514.35
5.6.350.0000.01414.50
5.6.340.0030.01014.30
5.6.330.0000.01014.76
5.6.320.0100.00014.36
5.6.310.0070.00714.41
5.6.300.0060.00614.43
5.6.290.0060.00614.31
5.6.280.0050.03817.79
5.6.270.0030.00714.33
5.6.260.0000.01413.96
5.6.250.0000.01714.24
5.6.240.0070.01014.43
5.6.230.0060.03617.57
5.6.220.0020.04117.35
5.6.210.0050.03917.52
5.6.200.0020.04117.71
5.6.190.0110.02517.63
5.6.180.0080.04217.74
5.6.170.0110.04017.67
5.6.160.0140.02517.68
5.6.150.0080.02717.57
5.6.140.0100.03717.51
5.6.130.0100.04417.71
5.6.120.0050.04217.63
5.6.110.0120.02717.60
5.6.100.0020.03717.81
5.6.90.0050.04017.59
5.6.80.0020.04117.33
5.6.70.0160.03517.28
5.6.60.0080.03917.24
5.6.50.0050.03217.35
5.6.40.0070.04517.39
5.6.30.0090.03717.44
5.6.20.0120.02117.39
5.6.10.0110.03817.39
5.6.00.0120.03817.40
5.5.380.0060.00011.18
5.5.370.0050.04515.76
5.5.360.0050.02815.75
5.5.350.0100.03315.80
5.5.340.0020.02715.93
5.5.330.0050.04815.86
5.5.320.0170.02315.84
5.5.310.0060.02316.13
5.5.300.0090.04015.96
5.5.290.0080.03815.89
5.5.280.0070.04215.99
5.5.270.0090.02715.86
5.5.260.0050.04215.91
5.5.250.0080.04515.78
5.5.240.0070.04015.66
5.5.230.0070.03815.57
5.5.220.0080.02415.68
5.5.210.0030.03715.56
5.5.200.0050.04415.55
5.5.190.0030.04215.51
5.5.180.0070.04415.58
5.5.170.0040.00410.92
5.5.160.0070.04015.56
5.5.150.0050.03915.54
5.5.140.0050.04015.58
5.5.130.0050.04215.56
5.5.120.0070.02815.63
5.5.110.0070.03715.69
5.5.100.0000.04615.51
5.5.90.0080.03815.54
5.5.80.0100.03915.55
5.5.70.0080.03815.52
5.5.60.0070.04015.59
5.5.50.0030.02515.55
5.5.40.0030.02315.45
5.5.30.0050.04015.50
5.5.20.0050.04115.50
5.5.10.0040.04415.49
5.5.00.0050.02715.47
5.4.450.0030.04115.18
5.4.440.0080.02315.16
5.4.430.0060.04115.02
5.4.420.0020.04315.17
5.4.410.0080.03815.16
5.4.400.0030.03215.01
5.4.390.0020.04714.98
5.4.380.0070.03715.02
5.4.370.0060.03814.96
5.4.360.0050.02714.97
5.4.350.0070.04014.90
5.4.340.0050.04015.07
5.4.330.0050.00210.90
5.4.320.0070.03914.93
5.4.310.0070.04114.98
5.4.300.0000.03215.04
5.4.290.0070.03915.02
5.4.280.0080.03815.00
5.4.270.0090.03914.85
5.4.260.0070.04114.90
5.4.250.0020.03714.91
5.4.240.0050.04015.00
5.4.230.0030.04215.01
5.4.220.0050.04214.97
5.4.210.0100.02215.02
5.4.200.0060.02114.97
5.4.190.0050.03114.96
5.4.180.0100.03515.01
5.4.170.0050.03614.85
5.4.160.0000.02714.84
5.4.150.0070.04214.88
5.4.140.0120.02513.66
5.4.130.0080.02313.67
5.4.120.0050.03813.61
5.4.110.0080.03813.63
5.4.100.0030.04213.61
5.4.90.0030.04113.70
5.4.80.0020.04013.68
5.4.70.0050.03913.66
5.4.60.0070.03813.67
5.4.50.0020.04213.69
5.4.40.0060.02813.67
5.4.30.0050.04013.66
5.4.20.0030.03813.65
5.4.10.0090.04013.68
5.4.00.0030.04213.41
5.3.290.0050.02712.80
5.3.280.0060.03812.77
5.3.270.0080.02812.77
5.3.260.0030.04212.69
5.3.250.0050.04012.68
5.3.240.0050.04112.70
5.3.230.0050.02312.75
5.3.220.0000.04512.75
5.3.210.0050.04212.73
5.3.200.0070.03212.68
5.3.190.0060.03512.74
5.3.180.0050.03712.73
5.3.170.0000.03012.71
5.3.160.0080.03512.71
5.3.150.0090.03412.75
5.3.140.0100.02012.75
5.3.130.0050.03512.72
5.3.120.0050.04112.72
5.3.110.0040.04412.71
5.3.100.0070.03712.41
5.3.90.0020.02512.47
5.3.80.0030.03912.35
5.3.70.0090.02812.47
5.3.60.0080.03512.40
5.3.50.0010.04412.37
5.3.40.0100.03612.43
5.3.30.0090.03612.42
5.3.20.0050.02512.19
5.3.10.0100.03512.28
5.3.00.0070.03812.27

preferences:
36 ms | 401 KiB | 5 Q