3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lines = [ '24/08/2017,email@test.ie,1,2', '21/05/2018,test@234.com,1,2', '21/05/2018,test@test.ie,2,2' ]; $found = 0; $email = 'email@test.ie'; foreach ($lines as $line){ if (strpos($line, $email) !==false){ echo 'email is: ' . $email . PHP_EOL; $found = true; $arrayOfLine = explode(",", $line); $foundGroup = $arrayOfLine[2]; $foundVideo = $arrayOfLine[3]; } elseif (strpos($line, $email) ===false){ $found = false; } } echo '$found is: '. $found;
Output for git.master, git.master_jit, rfc.property-hooks
email is: email@test.ie $found is:

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