3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $wk_baseline = date('w', strtotime('01/01/2016')) + 1 . "\n"; echo ceil(max(date('z', strtotime("1/1/2016")) + (7 - $wk_baseline),0) / 7) . "\n"; echo ceil(max(date('z', strtotime("1/2/2016")) + (7 - $wk_baseline),0) / 7) . "\n"; echo ceil(max(date('z', strtotime("1/3/2016")) + (7 - $wk_baseline),0) / 7) . "\n"; echo ceil(max(date('z', strtotime("1/4/2016")) + (7 - $wk_baseline),0) / 7) . "\n"; echo ceil(max(date('z', strtotime("1/8/2016")) + (7 - $wk_baseline),0) / 7) . "\n"; echo ceil(max(date('z', strtotime("1/9/2016")) + (7 - $wk_baseline),0) / 7) . "\n"; echo ceil(max(date('z', strtotime("1/20/2016")) + (7 - $wk_baseline),0) / 7) . "\n"; echo ceil(max(date('z', strtotime("1/21/2016")) + (7 - $wk_baseline),0) / 7) . "\n"; echo ceil(max(date('z', strtotime("1/22/2016")) + (7 - $wk_baseline),0) / 7) . "\n"; echo ceil(max(date('z', strtotime("1/23/2016")) + (7 - $wk_baseline),0) / 7) . "\n"; echo ceil(max(date('z', strtotime("2/14/2016")) + (7 - $wk_baseline),0) / 7) . "\n"; ?>
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.3.32 - 7.3.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
6 1 1 1 1 2 2 3 3 4 4 7
Output for 7.1.0 - 7.1.33, 7.2.6 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
6 Notice: A non well formed numeric value encountered in /in/RstVg on line 3 1 Notice: A non well formed numeric value encountered in /in/RstVg on line 4 1 Notice: A non well formed numeric value encountered in /in/RstVg on line 5 1 Notice: A non well formed numeric value encountered in /in/RstVg on line 6 1 Notice: A non well formed numeric value encountered in /in/RstVg on line 7 2 Notice: A non well formed numeric value encountered in /in/RstVg on line 8 2 Notice: A non well formed numeric value encountered in /in/RstVg on line 9 3 Notice: A non well formed numeric value encountered in /in/RstVg on line 10 3 Notice: A non well formed numeric value encountered in /in/RstVg on line 11 4 Notice: A non well formed numeric value encountered in /in/RstVg on line 12 4 Notice: A non well formed numeric value encountered in /in/RstVg on line 13 7

preferences:
211.06 ms | 404 KiB | 255 Q