Skip to content

Use JSON semantics for equality and contains - #109

Merged
GrahamCampbell merged 1 commit into
masterfrom
pr9-json-equality-contains
Jun 10, 2026
Merged

GrahamCampbell merged 1 commit into
masterfrom
pr9-json-equality-contains

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Collaborator

This fixes equality to use JSON-style semantics, including one numeric type and recursive structural comparison without object key-order sensitivity. contains() now uses the same comparator for arrays and returns false, not null, when a string subject is searched with a non-string value. Empty arrays and empty objects still compare equal because PHP cannot distinguish them after associative JSON decoding, and numeric-string-keyed object behavior remains unchanged.

@GrahamCampbell
GrahamCampbell merged commit 57e2511 into master Jun 10, 2026
32 checks passed
@GrahamCampbell
GrahamCampbell deleted the pr9-json-equality-contains branch June 10, 2026 20:14
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.

1 participant