3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file = '24/08/2017,email@test.ie,1,2 21/05/2018,test@234.com,1,2 21/05/2018,test@test.ie,2,2'; $email = 'test@234.com'; //$lines = file("log.txt"); $lines = explode("\n", $file); $found = 0; foreach ($lines as $line){ if (strpos($line, $email) !==false){ $found = true; $arrayOfLine = explode(",", $line); $foundGroup = $arrayOfLine[2]; $foundVideo = $arrayOfLine[3]; } elseif (strpos($line, $email) ===false){ $found = false; } } print_r($arrayOfLine);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 21/05/2018 [1] => test@234.com [2] => 1 [3] => 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:
29.5 ms | 401 KiB | 8 Q