3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php <?php /** * Implements hook_block_info(). */ function tourcalendar_block_block_info() { $blocks = array(); $blocks['monthyear_block'] = array( 'info' => t('Month and Year Combo'), ); return $blocks; } /** * Implements hook_block_view(). */ function tourcalendar_block_block_view($delta='') { $block = array(); switch($delta) { case 'monthyear_block' : $block['content'] = monthyear_block_view(); break; } return $block; } /** * Custom function to assemble renderable array for block content. * Returns a renderable array with the block content. * @return * returns a renderable array of block content. */ function monthyear_block_view() { $block = array(); // Sets select list $currentpage = 'http://artmuseum.princeton.edu/learn/schedule-a-tour-or-visit/group-visits/calendar'; /* Months */ $now = mktime(0, 0, 0, date("m"), 1, date("Y")); $now1 = mktime(0, 0, 0, date("m")+1, 1, date("Y")); $now2 = mktime(0, 0, 0, date("m")+2, 1, date("Y")); $now3 = mktime(0, 0, 0, date("m")+3, 1, date("Y")); $now4 = mktime(0, 0, 0, date("m")+4, 1, date("Y")); $now5 = mktime(0, 0, 0, date("m")+5, 1, date("Y")); $now6 = mktime(0, 0, 0, date("m")+6, 1, date("Y")); $now7 = mktime(0, 0, 0, date("m")+7, 1, date("Y")); $now8 = mktime(0, 0, 0, date("m")+8, 1, date("Y")); $now9 = mktime(0, 0, 0, date("m")+9, 1, date("Y")); $now10 = mktime(0, 0, 0, date("m")+10, 1, date("Y")); $now11 = mktime(0, 0, 0, date("m")+11, 1, date("Y")); $now12 = mktime(0, 0, 0, date("m")+12, 1, date("Y")); $now13 = mktime(0, 0, 0, date("m")+13, 1, date("Y")); $now14 = mktime(0, 0, 0, date("m")+14, 1, date("Y")); $now15 = mktime(0, 0, 0, date("m")+15, 1, date("Y")); $now16 = mktime(0, 0, 0, date("m")+16, 1, date("Y")); $now17 = mktime(0, 0, 0, date("m")+17, 1, date("Y")); /* Labels */ echo $monthlabel = date("F Y", $now); echo $monthlabel1 = date("F Y", $now1); echo $monthlabel2 = date("F Y", $now2); echo $monthlabel3 = date("F Y", $now3); echo $monthlabel4 = date("F Y", $now4); echo $monthlabel5 = date("F Y", $now5); echo $monthlabel6 = date("F Y", $now6); echo $monthlabel7 = date("F Y", $now7); echo $monthlabel8 = date("F Y", $now8); echo $monthlabel9 = date("F Y", $now9); echo $monthlabel10 = date("F Y", $now10); echo $monthlabel11 = date("F Y", $now11); echo $monthlabel12 = date("F Y", $now12); echo $monthlabel13 = date("F Y", $now13); echo $monthlabel14 = date("F Y", $now14); echo $monthlabel15 = date("F Y", $now15); echo $monthlabel16 = date("F Y", $now16); echo $monthlabel17 = date("F Y", $now17);
Output for 5.3.0 - 5.4.24
Parse error: syntax error, unexpected '<' in /in/q9EII on line 3
Process exited with code 255.