3v4l.org

run code in 300+ PHP versions simultaneously
<?php $blackFridayDate = new DateTime('27-11-2014 23:59:59'); $nowTimestamp = new DateTime('now'); $bfDays = $bfHours = $bfMinutes = $bfSeconds = 0; if ( $blackFridayDate > $nowTimestamp ) { $bfDays = $blackFridayDate->diff($nowTimestamp)->d; $bfHours = $blackFridayDate->diff($nowTimestamp)->h; $bfMinutes = $blackFridayDate->diff($nowTimestamp)->i; $bfSeconds = $blackFridayDate->diff($nowTimestamp)->s; var_dump($bfDays, $bfHours, $bfMinutes, $bfSeconds); $bfDays2 = (($blackFridayDate - $nowTimestamp) / (60*60*24)); $bfHours2 = (($blackFridayDate - $nowTimestamp) / (60*60)); $bfMinutes2 = (($blackFridayDate - $nowTimestamp) / 60); $bfSeconds2 = (($blackFridayDate - $nowTimestamp); var_dump($bfDays2, $bfHours2, $bfMinutes2, $bfSeconds2); }
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.35
Parse error: syntax error, unexpected ';' in /in/BXNv0 on line 14
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected ';' in /in/BXNv0 on line 14
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/BXNv0 on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/BXNv0 on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/BXNv0 on line 6
Process exited with code 255.

preferences:
222.22 ms | 1399 KiB | 125 Q