Skip to content

zend_test: test ZPP specifiers - #23192

Open
Girgias wants to merge 9 commits into
php:masterfrom
Girgias:2026-08-zpp-tests
Open

zend_test: test ZPP specifiers#23192
Girgias wants to merge 9 commits into
php:masterfrom
Girgias:2026-08-zpp-tests

Conversation

@Girgias

@Girgias Girgias commented Aug 9, 2026

Copy link
Copy Markdown
Member

Move ZPP tests from Zend/ to zend_test/ and add tests for the bool/int/float/number ZPP specifiers.

We don't test ZPP in normal functional tests, but it should still be tested somewhere.

Obviously there are many specifiers meaning:

  • string (including "path" which tests for null bytes)
  • the array variations
  • the object variations
  • resource
  • functions
  • enum
  • the different unions (array|object, object|class-string, object|int, array|string, strint|int)

@Girgias
Girgias marked this pull request as ready for review August 9, 2026 23:41
@Girgias
Girgias requested a review from kocsismate as a code owner August 9, 2026 23:41

@arnaud-lb arnaud-lb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMHO we shouldn't have tests at all in ext/zend_test, unless they are testing the extension itself. That's usually not the case: We call functions of ext/zend_test for the purpose of testing something else.


$types = require 'types.inc';

foreach ($types as $type) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please print something between each loop, and maybe before each try/catch block below, so that we can identify what the output relates to. This helps a lot when debugging a regression, or just when reviewing the test.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants