3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dateSelected= date('Y-m-d'); $lasdate = strtotime("last year", strtotime($dateSelected)); $lasdate=date('Y-m-d', $lasdate); $lasone=date('Y-m-d', $lasdate-1); echo $lasdate; echo $lasone; ?>
based on J1WSK
Output for 7.1.0 - 7.2.0
Notice: A non well formed numeric value encountered in /in/67dcS on line 5 2015-01-021970-01-01
Output for 5.5.0 - 7.0.20
2015-01-021970-01-01