3v4l.org

run code in 300+ PHP versions simultaneously
<?php $st_array = array(); $st_data1['id'] = 1; $st_data1['title'] = 'Jane doe'; $st_data1['disk'] = '1,3,2'; array_push($st_array, $st_data1); $rc_disk_id = '1,3'; $st_data2['id'] = 2; $st_data2['title'] = 'Jane Smith'; $st_data2['disk'] = '3,1,4'; array_push($st_array, $st_data2); foreach($st_array as $st_data) { $rc_disk_ids = explode(",",$rc_disk_id); $st_disk_ids = explode(',', $st_data['disk']); $match = array_diff($rc_disk_ids, $st_disk_ids); if (empty($match)) { echo "\nFound\n"; print_r($st_data); } else { echo "Nope!"; } }
Output for git.master, git.master_jit, rfc.property-hooks
Found Array ( [id] => 1 [title] => Jane doe [disk] => 1,3,2 ) Found Array ( [id] => 2 [title] => Jane Smith [disk] => 3,1,4 )

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:
28.44 ms | 405 KiB | 5 Q