I oriented myself on this code: http://lxr.php.net/xref/PHP_5_5/ext/date/php_date.c#php_date_instantiate, but ``object_init_ex`` seem like a good fit. Will look into it.