Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple arrays in intersect_key_recursive() #6

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

borkweb
Copy link
Member

@borkweb borkweb commented Jan 17, 2025

This makes a slight tweak on top of intersect_key_recursive() to allow for the passing of any number of arrays.

This makes a slight tweak on top of intersect_key_recursive() to allow for the passing of any number of arrays.

$this->assertEquals( [
'a' => 1,
], $result2 );
'd' => [
Copy link
Contributor

@defunctl defunctl Jan 17, 2025

Choose a reason for hiding this comment

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

I'm pretty this test result should actually be:

			'a' => 1,
			'd' => [
				'y' => [
					'a' => 1,
					'b' => 2,
				],
				'z' => [
					'a' => 1,
					'b' => 2,
				],
			],

Base automatically changed from feature/array-intersect-key-recursive to main January 17, 2025 22:52
@defunctl defunctl self-requested a review January 17, 2025 22:57
Copy link
Contributor

@defunctl defunctl left a comment

Choose a reason for hiding this comment

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

🚀

@borkweb borkweb merged commit 36c35ff into main Jan 17, 2025
2 checks passed
@borkweb borkweb deleted the feature/variadic-intersect-key-recursive branch January 17, 2025 22:57
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.

2 participants