3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ (object)["id" => 22,"accessid" => 2, "utype_id" => 11, "discount" => 3434, "published" => 1], (object)["id" => 23,"accessid" => 2, "utype_id" => 14, "discount" => 2, "published" => 1] ]; $array2 = [ (object)["id" => 9, "type_name" => "Admin", "description" => "admin", "published" => 0], (object)["id" => 10, "type_name" => "Senior sales", "description" => "senior sales", "published" => 0], (object)["id" => 11, "type_name" => "junior sales", "description" => "junior sales", "published" => 1], (object)["id" => 14, "type_name" => "dealer", "description" => "dealer", "published" => 0], (object)["id" => 15, "type_name" => "fgdg", "description" => "dfg", "published" => 1], (object)["id" => 16, "type_name" => "fgdfg", "description" => "fgdfg", "published" => 0] ]; $utype_ids = []; foreach ($array1 as $item) { $utype_ids[$item->utype_id] = 1; } var_export(array_filter( $array2, function($v) use ($utype_ids) { return !isset($utype_ids[$v->id]); } ));
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => (object) array( 'id' => 9, 'type_name' => 'Admin', 'description' => 'admin', 'published' => 0, ), 1 => (object) array( 'id' => 10, 'type_name' => 'Senior sales', 'description' => 'senior sales', 'published' => 0, ), 4 => (object) array( 'id' => 15, 'type_name' => 'fgdg', 'description' => 'dfg', 'published' => 1, ), 5 => (object) array( 'id' => 16, 'type_name' => 'fgdfg', 'description' => 'fgdfg', 'published' => 0, ), )

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:
110.93 ms | 1504 KiB | 4 Q