3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $todayStart = new \DateTime('today 0:00'); $todayStart->setTimezone(new \DateTimeZone('PST')); $todayEnd = new \DateTime('tomorrow 0:00'); $todayEnd->setTimezone(new \DateTimeZone('PST')); var_dump([$todayStart->getTimestamp(), $todayEnd->getTimestamp()]);
Output for 5.4.0 - 5.4.25, 5.6.28, 7.0.14 - 7.1.0
array(2) { [0]=> int(1393974000) [1]=> int(1394060400) }
Output for 7.0.6
array(2) { [0]=> int(1462226400) [1]=> int(1462312800) }
Output for 5.6.14, 7.0.5
array(2) { [0]=> int(1459548000) [1]=> int(1459634400) }
Output for 7.0.4
array(2) { [0]=> int(1457564400) [1]=> int(1457650800) }
Output for 7.0.3
array(2) { [0]=> int(1458255600) [1]=> int(1458342000) }
Output for 7.0.2
array(2) { [0]=> int(1458601200) [1]=> int(1458687600) }
Output for 7.0.1
array(2) { [0]=> int(1458687600) [1]=> int(1458774000) }
Output for 7.0.0
array(2) { [0]=> int(1458946800) [1]=> int(1459033200) }
Output for 5.6.21
array(2) { [0]=> int(1462140000) [1]=> int(1462226400) }
Output for 5.6.20
array(2) { [0]=> int(1460152800) [1]=> int(1460239200) }
Output for 5.6.19
array(2) { [0]=> int(1457305200) [1]=> int(1457391600) }
Output for 5.6.18
array(2) { [0]=> int(1457910000) [1]=> int(1457996400) }
Output for 5.6.17
array(2) { [0]=> int(1458342000) [1]=> int(1458428400) }
Output for 5.6.16
array(2) { [0]=> int(1459033200) [1]=> int(1459116000) }
Output for 5.6.15
array(2) { [0]=> int(1459116000) [1]=> int(1459202400) }
Output for 5.6.13
array(2) { [0]=> int(1460671200) [1]=> int(1460757600) }
Output for 5.6.12
array(2) { [0]=> int(1461016800) [1]=> int(1461103200) }
Output for 5.6.11
array(2) { [0]=> int(1461362400) [1]=> int(1461448800) }
Output for 5.6.10
array(2) { [0]=> int(1461535200) [1]=> int(1461621600) }
Output for 5.6.9
array(2) { [0]=> int(1461708000) [1]=> int(1461794400) }
Output for 5.6.8
array(2) { [0]=> int(1461880800) [1]=> int(1461967200) }
Output for 5.6.7
array(2) { [0]=> int(1464127200) [1]=> int(1464213600) }
Output for 5.5.35
array(2) { [0]=> int(1463868000) [1]=> int(1463954400) }
Output for 5.5.34
array(2) { [0]=> int(1460239200) [1]=> int(1460325600) }
Output for 5.5.33
array(2) { [0]=> int(1457391600) [1]=> int(1457478000) }
Output for 5.5.32
array(2) { [0]=> int(1458082800) [1]=> int(1458169200) }
Output for 5.5.31
array(2) { [0]=> int(1458428400) [1]=> int(1458514800) }
Output for 5.5.30
array(2) { [0]=> int(1459375200) [1]=> int(1459461600) }
Output for 5.5.29
array(2) { [0]=> int(1460757600) [1]=> int(1460844000) }
Output for 5.5.28
array(2) { [0]=> int(1461103200) [1]=> int(1461189600) }
Output for 5.5.27
array(2) { [0]=> int(1461189600) [1]=> int(1461276000) }
Output for 5.5.26
array(2) { [0]=> int(1461621600) [1]=> int(1461708000) }
Output for 5.5.25
array(2) { [0]=> int(1461794400) [1]=> int(1461880800) }
Output for 5.5.24
array(2) { [0]=> int(1463954400) [1]=> int(1464040800) }
Output for 5.4.41 - 5.4.45
array(2) { [0]=> int(1442181600) [1]=> int(1442268000) }
Output for 5.4.39 - 5.4.40
array(2) { [0]=> int(1431208800) [1]=> int(1431295200) }
Output for 5.4.38
array(2) { [0]=> int(1425250800) [1]=> int(1425337200) }
Output for 5.4.34 - 5.4.37
array(2) { [0]=> int(1423350000) [1]=> int(1423436400) }
Output for 5.4.26 - 5.4.32
array(2) { [0]=> int(1410040800) [1]=> int(1410127200) }
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/AESYT on line 6
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/AESYT on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/AESYT on line 3 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/AESYT on line 4 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/AESYT on line 5 Parse error: syntax error, unexpected '[', expecting ')' in /in/AESYT on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/AESYT on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/AESYT on line 3 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/AESYT on line 4 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/AESYT on line 5 Parse error: parse error, unexpected '[', expecting ')' in /in/AESYT on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/AESYT on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/AESYT on line 3 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/AESYT on line 4 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/AESYT on line 5 Parse error: parse error, expecting `')'' in /in/AESYT on line 6
Process exited with code 255.