fork(2) download
  1. <?php
  2. $rawTz = "Lisbon";
  3. foreach (DateTimeZone::listIdentifiers() as $timezone) {
  4. //echo $timezone;
  5.  
  6. if(preg_match("/.*?\/$rawTz/", $timezone)){
  7. echo $timezone;
  8. }
  9. }
  10.  
  11.  
  12. //echo array_search('New_York', DateTimeZone::listIdentifiers(), true);
  13. //print_r(preg_grep ( '/.*?New_York.*?/i' , DateTimeZone::listIdentifiers()));
  14.  
  15.  
  16.  
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
Europe/Lisbon