Skip to content

Conversation

@Nebual
Copy link

@Nebual Nebual commented Jan 14, 2019

This fixes #43.
I'm simply copying the parameter parsing from official php source https://github.com/php/php-src/blob/e219ec144ef6682b71e135fd18654ee1bb4676b4/ext/date/php_date.c as it appears the strict_type checking occurs inside the Z_PARAM_STR()/ZEND_PARSE_PARAMETERS_END_EX() macros. I left the original php-source names, which is why they're a little inconsistent (heh).

As this is effectively parsing the parameters an additional time, it comes with a very slight performance hit, but I figure that's totally acceptable for a testing library if it means more correctness.

cs278 added a commit to kiddivouchers/php-timecop that referenced this pull request Sep 27, 2019
hnw#44

* hnw/pr/44:
  Support strict_types=1 for overridden functions Fixes hnw#43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overridden functions ignore declare(strict_types=1)

1 participant