3v4l.org

run code in 300+ PHP versions simultaneously
<?php $newstring = 'Volvo Trucks - Rajnikanth - The Epic Split feat. (Live Test 6) @xyz Thalaivar Epic Split Rajanikanth Rajinikanth Rajani Auto Auto rikshaw and also @xyz.abc http://another.net @bac.def this is tesging @pqr '; $array = explode(" ", $newstring); $result=array(); foreach($array as $key=>$value) { if( strpos($value, '@', 0) == 0 && strpos($value, '@', 1) != "") $result[$key] = $value; echo $value; } $result = array_values($result); print_r($result); echo "--".strpos("txyz", '@', 0); ?>
Output for git.master, git.master_jit, rfc.property-hooks
VolvoTrucks-Rajnikanth-TheEpicSplitfeat.(LiveTest6)@xyzThalaivarEpicSplitRajanikanthRajinikanthRajaniAutoAutorikshawandalso@xyz.abchttp://another.net@bac.defthisistesging@pqr Fatal error: Uncaught ValueError: strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) in /in/Io9Uu:7 Stack trace: #0 /in/Io9Uu(7): strpos('', '@', 1) #1 {main} thrown in /in/Io9Uu on line 7
Process exited with code 255.

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