Skip to content

Conversation

@distvan
Copy link

@distvan distvan commented Dec 28, 2025

This PR adds missing Zend tests for strlen() when called with invalid
argument types that are rejected by the engine before the function
implementation is reached.

Covered cases:

  • resource argument
  • object without __toString()
  • enum case (PHP 8.1+)

All tests assert the user-visible error message and are placed under
Zend/tests/, consistent with existing strlen invalid-type coverage
(e.g. strlen_deprecation_to_exception.phpt).

Copy link
Member

@ndossche ndossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't add tests for functions with standard (ZPP) argument parsing.
We also don't support running the test suite on older PHP versions so we don't add PHP version checks in SKIPIF conditions.

@distvan
Copy link
Author

distvan commented Dec 28, 2025

Thanks for the clarification.
That makes sense — since strlen() uses standard ZPP argument parsing, these cases are already covered at the engine level and don’t need function-specific tests.
I’ll close this PR accordingly.

@distvan distvan closed this Dec 28, 2025
@lyabrahymabrahym683-ops
Copy link

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.

3 participants