3v4l.org

run code in 500+ PHP versions simultaneously
<?php $words = array("3d", "4"); $sentences = array("x-3d-abstract--part--282345", "3d-speed--boat-430419", "beautiful-flower-462451", "3d-d--384967"); foreach ($words as $word) { $sentences_found = array_values(array_filter($sentences, function($find_words) use ($word) {return strpos($find_words, $word);})); } print_r($sentences_found);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/tD5t5
function name:  (null)
number of ops:  20
compiled vars:  !0 = $words, !1 = $sentences, !2 = $word, !3 = $sentences_found
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    3     1        ASSIGN                                                       !1, <array>
    5     2      > FE_RESET_R                                           $6      !0, ->15
          3    > > FE_FETCH_R                                                   $6, !2, ->15
    6     4    >   INIT_FCALL                                                   'array_values'
          5        INIT_FCALL                                                   'array_filter'
          6        SEND_VAR                                                     !1
          7        DECLARE_LAMBDA_FUNCTION                              ~7      [0]
          8        BIND_LEXICAL                                                 ~7, !2
          9        SEND_VAL                                                     ~7
         10        DO_ICALL                                             $8      
         11        SEND_VAR                                                     $8
         12        DO_ICALL                                             $9      
         13        ASSIGN                                                       !3, $9
    5    14      > JMP                                                          ->3
         15    >   FE_FREE                                                      $6
    8    16        INIT_FCALL                                                   'print_r'
         17        SEND_VAR                                                     !3
         18        DO_ICALL                                                     
         19      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tD5t5
function name:  {closure:/in/tD5t5:6}
number of ops:  5
compiled vars:  !0 = $find_words, !1 = $word
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
          2        FRAMELESS_ICALL_2                strpos              ~2      !0, !1
          3      > RETURN                                                       ~2
          4*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.48 ms | 2801 KiB | 16 Q