3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = new DateTimeZone( 'CEST' ); var_dump( ( new DateTime( 'now', $d ) )->format( 'P' ), $d->getOffset( new DateTime() ) );
Output for 8.0.21 - 8.0.30, 8.1.8 - 8.1.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
string(6) "+02:00" int(7200)
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.20, 8.1.0 - 8.1.7
string(6) "+01:00" int(3600)

preferences:
92.12 ms | 407 KiB | 5 Q