3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array ( 0 => array ( 'rating_id' => 'rwp_rating_5b4da83f6b281', 'rating_post_id' => 343, 'rating_review_id' => '0', 'rating_score' => array ( 0 => 2.0, 1 => 2.0, 2 => 3.5, ), 'rating_user_id' => 0, 'rating_user_name' => 'Joep van Dongen', 'rating_user_email' => 'dongen.van.joep@gmail.com', 'rating_title' => 'Dit is een test beoordeling', 'rating_comment' => 'Dit is een test beoordeling', 'rating_images' => array ( ), 'rating_date' => 1531815999, 'rating_status' => 'published', 'rating_verified' => false, 'rating_template' => 'rwp_template_5b16a33aa16b7', 'rating_privacy' => array ( ), ), 1 => array ( 'rating_id' => 'rwp_rating_5bd0271605392', 'rating_post_id' => 343, 'rating_review_id' => '0', 'rating_score' => array ( 0 => 5.0, 1 => 5.0, 2 => 5.0, ), 'rating_user_id' => 4, 'rating_user_name' => '', 'rating_user_email' => '', 'rating_title' => 'Harry de Vries', 'rating_comment' => 'Dit is een testreview om te kijken of et werkrty', 'rating_images' => array ( ), 'rating_date' => 1540368150, 'rating_status' => 'published', 'rating_verified' => false, 'rating_template' => 'rwp_template_5b16a33aa16b7', 'rating_privacy' => array ( 't5bab7c0abed1f' => 'true', ), ), ); $new = array_intersect_key($arr,array_intersect(array_column($arr, 'rating_post_id'), [343])); Var_dump($new); Echo count($new);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> array(15) { ["rating_id"]=> string(24) "rwp_rating_5b4da83f6b281" ["rating_post_id"]=> int(343) ["rating_review_id"]=> string(1) "0" ["rating_score"]=> array(3) { [0]=> float(2) [1]=> float(2) [2]=> float(3.5) } ["rating_user_id"]=> int(0) ["rating_user_name"]=> string(15) "Joep van Dongen" ["rating_user_email"]=> string(25) "dongen.van.joep@gmail.com" ["rating_title"]=> string(27) "Dit is een test beoordeling" ["rating_comment"]=> string(27) "Dit is een test beoordeling" ["rating_images"]=> array(0) { } ["rating_date"]=> int(1531815999) ["rating_status"]=> string(9) "published" ["rating_verified"]=> bool(false) ["rating_template"]=> string(26) "rwp_template_5b16a33aa16b7" ["rating_privacy"]=> array(0) { } } [1]=> array(15) { ["rating_id"]=> string(24) "rwp_rating_5bd0271605392" ["rating_post_id"]=> int(343) ["rating_review_id"]=> string(1) "0" ["rating_score"]=> array(3) { [0]=> float(5) [1]=> float(5) [2]=> float(5) } ["rating_user_id"]=> int(4) ["rating_user_name"]=> string(0) "" ["rating_user_email"]=> string(0) "" ["rating_title"]=> string(14) "Harry de Vries" ["rating_comment"]=> string(48) "Dit is een testreview om te kijken of et werkrty" ["rating_images"]=> array(0) { } ["rating_date"]=> int(1540368150) ["rating_status"]=> string(9) "published" ["rating_verified"]=> bool(false) ["rating_template"]=> string(26) "rwp_template_5b16a33aa16b7" ["rating_privacy"]=> array(1) { ["t5bab7c0abed1f"]=> string(4) "true" } } } 2

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:
31.85 ms | 411 KiB | 5 Q