3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(new Datetime('now -2 weekdays'));
Output for 8.3.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.008786" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.3.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.010768" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.3.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.007178" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.3.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.007053" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.24, 8.3.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003936" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.3.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003676" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.3.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003754" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.010670" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.008482" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.006657" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003839" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.006956" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003776" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003930" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.004342" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.005678" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003935" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003753" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.004108" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.007514" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003875" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.004265" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.2 - 8.2.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003869" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003821" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.004103" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.008184" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.27
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003751" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.14, 8.1.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003832" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003628" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.23
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.005074" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.22
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003721" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003823" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003899" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003663" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003570" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003865" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003614" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003573" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003314" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003473" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003563" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003684" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003794" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003595" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003862" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003560" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003997" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003980" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003837" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003793" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.004062" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003617" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.004716" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.29
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003477" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003310" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.27
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003604" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003092" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003492" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003621" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.23
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.004533" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.22
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003653" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003329" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003058" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003410" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003419" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003985" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003278" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003364" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.005589" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 16:55:35.002230" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }
Output for 8.0.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003922" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003456" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 8.0.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 17:55:35.003481" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.14 - 5.5.38, 5.6.0 - 5.6.38, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.32 - 7.3.33
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-01 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }
Output for 5.5.0 - 5.5.13
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-12-01 00:00:00" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }

preferences:
252.37 ms | 402 KiB | 323 Q