- strpos: documentation ( source)
- phpversion: documentation ( source)
- array_keys: documentation ( source)
- timezone_abbreviations_list: documentation ( source)
<?php
$pos = strpos('PHP 5.6.10', phpversion());
$pos_old = strpos('5.5.9', phpversion());
$arr_new = array();
$arr_old = array();
print "<pre>";
if($pos !== false){
$arr_new = timezone_abbreviations_list();
foreach( $arr_new as $key => $arr){
foreach($arr as $sub_arr){
echo $key. '=>'. $sub_arr['timezone_id'];
echo "\n";
}
}
}
if($pos_old !== false){
$arr_old = array_keys(timezone_abbreviations_list());
}
?>