3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<html> <head> <title>Takvim</title> <link rel=stylesheet type="text/css" href="./styles/styles.css"> </head> <body bgcolor="#FFFFE0"> <?php $j = $j ? $j : date("Y",time()); $m = $m ? $m : date("n",time()); $d = $d ? $d : date("j",time()); $intDATE=(mktime(0,0,0,$m,$d,$j)); $upM=mktime(0,0,0,($m+1),1,$j); $doM=mktime(0,0,0,($m-1),1,$j); function get_mARRAY() { global $intDATE; global $d; global $m; global $j; if (date("w",mktime(0,0,0,$m,1,$j))==2) { //if 1st of requested month is a monday -start with first $startDAY=mktime(0,0,0,$m,1,$j); } else { //if not then we look for the last monday of the previous month $startDAY=mktime(0,0,0,$m,0-date("w",mktime(0,0,0,$m,1-1,$j)),$j); } for ($i=1;$i<=42;$i++) { $marray[$i]=mktime(0,0,0,date("n",$startDAY),date("j",$startDAY)+$i,date ("Y",$startDAY)); } return $marray; } $mARRAY=get_mARRAY(); ?> <table border="0"> <tr> <td align="left"> <?php echo '<a href="calnav.php?j=' . date ("Y",$doM) . '&m=' . date("n",$doM) . '&d=' . date("j",$doM) . '" target="navframe">'; echo '<<'; echo '</a>'; ?> </td> <td colspan="5"> <p align="center"><font size="1" face="Verdana" color="#000080"> <?php echo date("F",$intDATE) . " " . date("Y",$intDATE); ?></font></p> </td> <td align="right"> <?php echo '<a href="calnav.php?j=' . date("Y",$upM) . '&m=' . date ("n",$upM) . '&d=' . date("j",$upM) . '" target="navframe">'; echo '>>'; echo '</a>'; ?> </font></td> </tr> <tr> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> M </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> T </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> W </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> T </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> F </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> S </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> S </font></td> </tr> <?php $countDAYS=1; for ($w=1;$w<=6;$w++) { echo '<tr>'; for ($d=1;$d<=7;$d++) { echo '<td height=15 align="center">'; if (((date("j",$mARRAY[$countDAYS])>7) & ($w==1)) | ((date ("j",$mARRAY[$countDAYS])<=14) & ($w>=5))) { echo '<a href="calnav.php?j=' . date("Y",$mARRAY[$countDAYS]) . '&m=' . date("n",$mARRAY[$countDAYS]) . '&d=' . date("j",$mARRAY[$countDAYS]) . '" target="navframe" style="color:C0C0C0">'; echo date("j",$mARRAY[$countDAYS]); echo '</a>'; } else { if ($mARRAY[$countDAYS]==$intDATE) { echo '<strong>'; } echo '<a href="calnav.php?j=' . date("Y",$mARRAY[$countDAYS]) . '&m=' . date("n",$mARRAY[$countDAYS]) . '&d=' . date("j",$mARRAY[$countDAYS]) . '" target="navframe">'; echo date("j",$mARRAY[$countDAYS]); echo '</a>'; if ($mARRAY[$countDAYS]==$intDATE) { echo '</strong>'; } } echo '</td>'; $countDAYS=++$countDAYS; } echo '</tr>'; } ?> </table> </body> </html> <?php
Output for 5.4.0 - 5.6.2
Parse error: syntax error, unexpected end of file in /in/TfGtb on line 133
Process exited with code 255.
Output for 5.0.4 - 5.3.29
<html> <head> <title>Takvim</title> <link rel=stylesheet type="text/css" href="./styles/styles.css"> </head> <body bgcolor="#FFFFE0"> Notice: Undefined variable: j in /in/TfGtb on line 9 Notice: Undefined variable: m in /in/TfGtb on line 10 Notice: Undefined variable: d in /in/TfGtb on line 11 <table border="0"> <tr> <td align="left"> <a href="calnav.php?j=2014&m=9&d=1" target="navframe"><<</a> </td> <td colspan="5"> <p align="center"><font size="1" face="Verdana" color="#000080"> October 2014</font></p> </td> <td align="right"> <a href="calnav.php?j=2014&m=11&d=1" target="navframe">>></a> </font></td> </tr> <tr> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> M </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> T </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> W </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> T </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> F </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> S </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> S </font></td> </tr> <tr><td height=15 align="center"><a href="calnav.php?j=2014&m=9&d=29" target="navframe" style="color:C0C0C0">29</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=9&d=30" target="navframe" style="color:C0C0C0">30</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=1" target="navframe">1</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=2" target="navframe">2</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=3" target="navframe">3</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=4" target="navframe">4</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=5" target="navframe">5</a></td></tr><tr><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=6" target="navframe">6</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=7" target="navframe">7</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=8" target="navframe">8</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=9" target="navframe">9</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=10" target="navframe">10</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=11" target="navframe">11</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=12" target="navframe">12</a></td></tr><tr><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=13" target="navframe">13</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=14" target="navframe">14</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=15" target="navframe">15</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=16" target="navframe">16</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=17" target="navframe">17</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=18" target="navframe">18</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=19" target="navframe">19</a></td></tr><tr><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=20" target="navframe">20</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=21" target="navframe">21</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=22" target="navframe">22</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=23" target="navframe">23</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=24" target="navframe">24</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=25" target="navframe">25</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=26" target="navframe">26</a></td></tr><tr><td height=15 align="center"><strong><a href="calnav.php?j=2014&m=10&d=27" target="navframe">27</a></strong></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=28" target="navframe">28</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=29" target="navframe">29</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=30" target="navframe">30</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=31" target="navframe">31</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=1" target="navframe" style="color:C0C0C0">1</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=2" target="navframe" style="color:C0C0C0">2</a></td></tr><tr><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=3" target="navframe" style="color:C0C0C0">3</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=4" target="navframe" style="color:C0C0C0">4</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=5" target="navframe" style="color:C0C0C0">5</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=6" target="navframe" style="color:C0C0C0">6</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=7" target="navframe" style="color:C0C0C0">7</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=8" target="navframe" style="color:C0C0C0">8</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=9" target="navframe" style="color:C0C0C0">9</a></td></tr></table> </body> </html> <?php
Output for 4.3.0 - 5.0.3
<html> <head> <title>Takvim</title> <link rel=stylesheet type="text/css" href="./styles/styles.css"> </head> <body bgcolor="#FFFFE0"> Notice: Undefined variable: j in /in/TfGtb on line 9 Notice: Undefined variable: m in /in/TfGtb on line 10 Notice: Undefined variable: d in /in/TfGtb on line 11 <table border="0"> <tr> <td align="left"> <a href="calnav.php?j=2014&m=9&d=1" target="navframe"><<</a> </td> <td colspan="5"> <p align="center"><font size="1" face="Verdana" color="#000080"> October 2014</font></p> </td> <td align="right"> <a href="calnav.php?j=2014&m=11&d=1" target="navframe">>></a> </font></td> </tr> <tr> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> M </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> T </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> W </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> T </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> F </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> S </font></td> <td width=17 height=17 align="center" bgcolor="#000080"> <font color="#FFFFFF"> S </font></td> </tr> <tr><td height=15 align="center"><a href="calnav.php?j=2014&m=9&d=29" target="navframe" style="color:C0C0C0">29</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=9&d=30" target="navframe" style="color:C0C0C0">30</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=1" target="navframe">1</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=2" target="navframe">2</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=3" target="navframe">3</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=4" target="navframe">4</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=5" target="navframe">5</a></td></tr><tr><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=6" target="navframe">6</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=7" target="navframe">7</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=8" target="navframe">8</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=9" target="navframe">9</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=10" target="navframe">10</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=11" target="navframe">11</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=12" target="navframe">12</a></td></tr><tr><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=13" target="navframe">13</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=14" target="navframe">14</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=15" target="navframe">15</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=16" target="navframe">16</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=17" target="navframe">17</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=18" target="navframe">18</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=19" target="navframe">19</a></td></tr><tr><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=20" target="navframe">20</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=21" target="navframe">21</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=22" target="navframe">22</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=23" target="navframe">23</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=24" target="navframe">24</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=25" target="navframe">25</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=26" target="navframe">26</a></td></tr><tr><td height=15 align="center"><strong><a href="calnav.php?j=2014&m=10&d=27" target="navframe">27</a></strong></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=28" target="navframe">28</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=29" target="navframe">29</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=30" target="navframe">30</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=10&d=31" target="navframe">31</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=1" target="navframe" style="color:C0C0C0">1</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=2" target="navframe" style="color:C0C0C0">2</a></td></tr><tr><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=3" target="navframe" style="color:C0C0C0">3</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=4" target="navframe" style="color:C0C0C0">4</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=5" target="navframe" style="color:C0C0C0">5</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=6" target="navframe" style="color:C0C0C0">6</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=7" target="navframe" style="color:C0C0C0">7</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=8" target="navframe" style="color:C0C0C0">8</a></td><td height=15 align="center"><a href="calnav.php?j=2014&m=11&d=9" target="navframe" style="color:C0C0C0">9</a></td></tr></table> </body> </html> <?php