3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $input = new \DateTime('2017-07-14'); $firstDayOfMonth = new \DateTime($input->format('Y-m-01')); var_dump($input->format('l')); var_dump($input->format('n') % 7);
Output for 5.6.30 - 5.6.38, hhvm-3.15.4 - 3.22.0, 7.0.0 - 7.2.11
string(6) "Friday" int(0)