3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $days = 1; $time = strtotime("-{$days} days"); echo "Time: {$time}\nData atual: " . date('Y-m-d') . "\nData antiga: " . date('Y-m-d', $time);
based on q8hK3
Output for 4.3.0 - 4.4.9, 5.0.3 - 5.4.35, 5.4.37 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Time: 1413141801 Data atual: 2014-10-13 Data antiga: 2014-10-12
Output for 5.4.36
Time: 1413141800 Data atual: 2014-10-13 Data antiga: 2014-10-12
Output for 5.0.0 - 5.0.2
Time: 1413064800 Data atual: 2014-10-13 Data antiga: 2014-10-12