3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // php 5.3.1 echo (float)135.45; // 135.45 $departure_date = new DateTime('2014-05-26'); $return_date = new DateTime('2014-05-28'); $days = $departure_date->diff($return_date); echo "<br>\n"; echo (float)135.45; // 8.KKPPPPPPPPPPQ
Output for 5.3.0 - 7.1.0
135.45<br> 135.45
Output for 5.2.0 - 5.2.17
135.45 Fatal error: Call to undefined method DateTime::diff() in /in/QNiPT on line 6
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.1.6
135.45 Fatal error: Class 'DateTime' not found in /in/QNiPT on line 4
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/QNiPT on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.9
135.45 Fatal error: Cannot instantiate non-existent class: datetime in /in/QNiPT on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
135.45 Fatal error: Cannot instantiate non-existent class: datetime in /in/QNiPT on line 4