3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text="one #two three #four #five"; $parts = explode(' ', $text); $parts = array_filter( function($word) {return strpos("#",$word)!==1;}, $array ); print_r($parts);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KEhZI
function name:  (null)
number of ops:  16
compiled vars:  !0 = $text, !1 = $parts, !2 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'one+%23two+three+%23four+%23five'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6        INIT_FCALL                                               'array_filter'
    6     7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FKEhZI%3A6%240'
          8        SEND_VAL                                                 ~6
    7     9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $7      
    5    11        ASSIGN                                                   !1, $7
    9    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FKEhZI%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KEhZI
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $word
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'strpos'
          2        SEND_VAL                                                 '%23'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        IS_NOT_IDENTICAL                                 ~2      $1, 1
          6      > RETURN                                                   ~2
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FKEhZI%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
228.64 ms | 1400 KiB | 21 Q