3v4l.org

run code in 300+ PHP versions simultaneously
<?php $entries = array( "111 222 465", "666 123 412", "000 999", ); $test = array(111, 465, 555, 666, 777); foreach ($entries as $key => $etry) { $plotsTotal1 = explode(' ', $entry); $plotsTotal2 = array_filter($plotsTotal1); $matches = array_intersect($test, $plotsTotal2); if (count($matches) > 0) { echo 'Entry ' . $key. ' contains ' . implode(',', $matches) . '<br/>'; } }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $entry in /in/mAQTt on line 11 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/mAQTt on line 11 Warning: Undefined variable $entry in /in/mAQTt on line 11 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/mAQTt on line 11 Warning: Undefined variable $entry in /in/mAQTt on line 11 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/mAQTt on line 11

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:
60.82 ms | 402 KiB | 8 Q