aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/dev/plugin-class-classification.md
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-17 07:20:29 +0900
committernsfisis <nsfisis@gmail.com>2026-08-17 07:20:29 +0900
commit6b4ce98f20b3cfc14f1c955565a8acd9abcc16a2 (patch)
tree1c752ee23480e71fabad42c3bbe2b7ffc7f6acdc /docs/dev/plugin-class-classification.md
parentc7aa10384a2548167466b4c61f9eff29ed8611f6 (diff)
downloadphp-shirabe-6b4ce98f20b3cfc14f1c955565a8acd9abcc16a2.tar.gz
php-shirabe-6b4ce98f20b3cfc14f1c955565a8acd9abcc16a2.tar.zst
php-shirabe-6b4ce98f20b3cfc14f1c955565a8acd9abcc16a2.zip
refactor(preg): report unmatched groups as null in the vec-shaped preg_*
preg_match_all() and preg_match_all_set_order() were the last preg_* functions handing back a bare Vec<String>, where a group that did not participate is indistinguishable from one that captured "". Hand back Option<String> as the map-shaped functions already do; php_match_row(), the last of the truncate-then-pad helpers, goes with them. preg_split_delim_capture() keeps its Vec<String>. preg_split() accepts no PREG_UNMATCHED_AS_NULL, so there is no null form to move it to, and its result interleaves split segments -- which can never be absent -- with the captured delimiters. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'docs/dev/plugin-class-classification.md')
0 files changed, 0 insertions, 0 deletions