3v4l.org

run code in 300+ PHP versions simultaneously
<?php $carts = array( 'Olivia' => array(51, 3, 2), 'Harry' => array(312, 314, 10), 'Charlie' => array(1, 314, 626) ); $fruits = array( 'Apple' => array('id' => 1), 'Banana' => array('id' => 2), 'Peach' => array('id' => 3) ); $fru = array_column($fruits, "id"); foreach ($carts as $cart) { echo count(array_intersect($cart, $fru)) ? "Fruit \n" : "No Fruit \n"; }
Output for git.master, git.master_jit, rfc.property-hooks
Fruit No Fruit Fruit

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:
51.29 ms | 401 KiB | 8 Q