3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo max(floor((strtotime('2017-07-10') - time()) / 86400), 1); echo '<br>'; echo '<br>'; preg_match('#([0-9]+)\-([0-9]+)#', '3-5 dnů', $maa); var_dump($maa[2]); echo '<br>'; echo '<br>'; $start = new DateTime(); $end = new DateTime('2017-07-08'); $days = abs(round(($end->format('U') - $start->format('U')) / (60*60*24)) + 1); echo $days;
Output for 5.2.17
2<br><br>string(1) "5" <br><br>1