3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mysql = [ ['id' => 1, 'userid' => 655342], ['id' => 3, 'userid' => 777777], ['id' => 6, 'userid' => 454777], ]; $mongo = [ ['id' => 1, 'userid' => 655342, 'addr1' => '123 Test Ave', 'addr2' => 'MyCityState', 'zipcd' => '99955', 'items' => 888888], ['id' => 2, 'userid' => 989855, 'addr1' => '124 Test Ave', 'addr2' => 'MyCityState', 'zipcd' => '66955', 'items' => 887788], ['id' => 3, 'userid' => 777777, 'addr1' => '125 Test Ave', 'addr2' => 'MyCityState', 'zipcd' => '11955', 'items' => 886688], ['id' => 4, 'userid' => 666666, 'addr1' => '126 Test Ave', 'addr2' => 'MyCityState', 'zipcd' => '39954', 'items' => 885588], ]; var_export( array_uintersect($mongo, $mysql, fn($a, $b) => $a['userid'] <=> $b['userid']) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 'id' => 1, 'userid' => 655342, 'addr1' => '123 Test Ave', 'addr2' => 'MyCityState', 'zipcd' => '99955', 'items' => 888888, ), 2 => array ( 'id' => 3, 'userid' => 777777, 'addr1' => '125 Test Ave', 'addr2' => 'MyCityState', 'zipcd' => '11955', 'items' => 886688, ), )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
135.07 ms | 406 KiB | 5 Q