3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time_zones = ['America/Indiana/Indianapolis', 'Atlantic/Reykjavik']; foreach ($time_zones as $tz_name) { $abbrev = DateTimeZone::listAbbreviations(); $abbrev = array_merge( ...array_values( $abbrev ) ); $abbrev = array_filter( $abbrev, function ( $entry ) use ( $tz_name ) { return $entry['timezone_id'] === $tz_name; } ); $does_dst = in_array( true, array_column( $abbrev, 'dst' ), true ); var_dump( $tz_name, $does_dst ); }
Output for git.master, git.master_jit, rfc.property-hooks
string(28) "America/Indiana/Indianapolis" bool(true) string(18) "Atlantic/Reykjavik" bool(false)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
58.04 ms | 405 KiB | 5 Q