3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //echo (new DateTime())->format('Y-m-d'); //$azi = date('Y-m-d'); //$azi->sub(new DateInterval('P5D')); //$lead_time= (new DateTime('2014-09-05 13:18:26'))->format('Y-m-d'); $azi = new DateTime(); $azi->sub(new DateInterval('P5D')); $lead_time= new DateTime('2014-09-05 13:18:26') echo $azi->format('Y-m-d') . "\n"; echo "<br>"; echo $lead_time->format('Y-m-d') . "\n"; if($lead_time<$azi){ // Leaduri mai vechi $l_class=""; }else{ // Leaduri Fresh $l_class="fresh_leads"; echo "Fresh"; } /* $azi->sub(new DateInterval('P5D')); echo $azi; */
based on VZePn
Output for 5.4.0 - 5.4.32
Parse error: syntax error, unexpected 'echo' (T_ECHO) in /in/qp8Gc on line 12
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_ECHO in /in/qp8Gc on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_ECHO in /in/qp8Gc on line 12
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/qp8Gc on line 12
Process exited with code 255.