3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = date('Y-m-d', strtotime('-29 days')); $today = date("Y-m-d"); $from_date = date ("Y-m-d", strtotime("-29 day", strtotime($date))); echo "date [$date] today[$today] from_date[$from_date]".PHP_EOL;
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.2.0
date [2015-04-08] today[2015-05-07] from_date[2015-03-10]
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/FX7jI on line 7 date [2015-04-08] today[2015-05-07] from_date[2015-03-10]PHP_EOL