Skip to content

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