Skip to content

Instantly share code, notes, and snippets.

@hax
Last active August 29, 2015 13:57
Show Gist options
  • Save hax/9479075 to your computer and use it in GitHub Desktop.
Save hax/9479075 to your computer and use it in GitHub Desktop.
typehint bug of Intl extension in PHP 5.5
<?php
$f = new ReflectionFunction('intltz_from_date_time_zone');
var_dump($f->getParameters()[0]->getClass()); // cause ReflectionException in PHP 5.5
/*
run `php --rf intltz_from_date_time_zone` =>
Function [ <internal:intl> function intltz_from_date_time_zone ] {
- Parameters [1] {
Parameter #0 [ <required> IntlDateTimeZone $dateTimeZone ]
}
}
The problem is: `IntlDateTimeZone` should be `DateTimeZone`
*/
@hax
Copy link
Author

hax commented Mar 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment