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, '@', 0) === 1) $result[$key] = $value; } $result = array_values($result); print_r($result); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 28
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 28
Branch analysis from position: 9
2 jumps found. (Code = 46) Position 1 = 17, Position 2 = 24
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 27
Branch analysis from position: 24
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/VlIoV
function name:  (null)
number of ops:  37
compiled vars:  !0 = $newstring, !1 = $array, !2 = $result, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Volvo+Trucks+-+Rajnikanth+-+The+Epic+Split+feat.+%28Live+Test+6%29+%40xyz+Thalaivar+Epic+Split+Rajanikanth+Rajinikanth+Rajani+Auto+Auto+rikshaw+and+also+%40xyz.abc+http%3A%2F%2Fanother.net+%40bac.def+this+is+tesging+%40pqr+'
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    4     6        ASSIGN                                                   !2, <array>
    5     7      > FE_RESET_R                                       $9      !1, ->28
          8    > > FE_FETCH_R                                       ~10     $9, !3, ->28
          9    >   ASSIGN                                                   !4, ~10
    7    10        INIT_FCALL                                               'strpos'
         11        SEND_VAR                                                 !3
         12        SEND_VAL                                                 '%40'
         13        SEND_VAL                                                 0
         14        DO_ICALL                                         $12     
         15        IS_EQUAL                                         ~13     $12, 0
         16      > JMPZ_EX                                          ~13     ~13, ->24
         17    >   INIT_FCALL                                               'strpos'
         18        SEND_VAR                                                 !3
         19        SEND_VAL                                                 '%40'
         20        SEND_VAL                                                 0
         21        DO_ICALL                                         $14     
         22        IS_IDENTICAL                                     ~15     $14, 1
         23        BOOL                                             ~13     ~15
         24    > > JMPZ                                                     ~13, ->27
    8    25    >   ASSIGN_DIM                                               !2, !4
         26        OP_DATA                                                  !3
    5    27    > > JMP                                                      ->8
         28    >   FE_FREE                                                  $9
   10    29        INIT_FCALL                                               'array_values'
         30        SEND_VAR                                                 !2
         31        DO_ICALL                                         $17     
         32        ASSIGN                                                   !2, $17
   12    33        INIT_FCALL                                               'print_r'
         34        SEND_VAR                                                 !2
         35        DO_ICALL                                                 
   13    36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.08 ms | 941 KiB | 22 Q