3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt = new DateTime("now"); var_dump($dt); var_dump(property_exists($dt, "timezone")); var_dump($dt->timezone);
Output for 8.4.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.010131" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.4.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.010817" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.4.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.008553" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.4.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.004336" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.4.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.009306" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.4.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.009843" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.4.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.004594" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.4.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.010596" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.4.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.004709" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.4.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.009971" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.4.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.009618" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.4.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.009755" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.4.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.004148" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.008936" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.003731" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.009064" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.23
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.009023" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.22
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.008823" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.009150" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.004159" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.009461" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.009130" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.009387" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.008807" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.008886" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.003802" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.008856" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.006915" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.3.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.003631" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.2.29
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.009738" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.2.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.003657" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.2.27
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.008945" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.2.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.008851" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.2.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.009038" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.2.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.007382" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.1.33
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.008811" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.1.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.008861" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.1.31
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.003638" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL
Output for 8.1.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2024-11-18 23:33:30.008623" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) Warning: Undefined property: DateTime::$timezone in /in/ZS1MZ on line 6 NULL

preferences:
78.91 ms | 468 KiB | 5 Q