3v4l.org

run code in 200+ PHP versions simultaneously
<?php echo date_create('2011-04-24')->modify('-1 days')->format('Y-m-d');
based on NjQ2I
Output for 5.6.0 - 7.4.1
2011-04-23