3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $currentDate = new \Datetime(); $currentDate = $currentDate->modify('last week'); echo $currentDate->format('W');
based on eGXio
Output for 5.5.0 - 5.5.33, 5.6.0 - 5.6.19, 7.0.0 - 7.0.4, 7.0.20 - 7.3.0beta1
11
Output for 7.0.6
19
Output for 5.5.34, 5.6.20, 7.0.5
14
Output for 5.6.21
17
Output for 5.5.35
20