3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $year = 2016; $week_count = date('W', strtotime($year . '-12-31')); if ($week_count == '01') { $week_count = date('W', strtotime($year . '-12-24')); } echo $week_count;
based on 2PoEj
Output for 4.3.0 - 7.3.0rc4
52