3v4l.org

run code in 300+ PHP versions simultaneously
<?php $categories = array( array('name' => 'ImportOrders', 'keywords' => array('ImportOrders', 'CountriesArrayResponse')) ); $matches = array(); foreach($categories as $cat) { foreach($cat['keywords'] as $keyword) { $array_filter = function($var) use ($keyword) { return preg_match("/\b$keyword\b/i", $var); }; $matches[$cat['name']] = array_push(array_filter($types, $array_filter)); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 23
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 23
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 21
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 21
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 21
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/6k1pJ
function name:  (null)
number of ops:  25
compiled vars:  !0 = $categories, !1 = $matches, !2 = $cat, !3 = $keyword, !4 = $array_filter, !5 = $types
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, <array>
    7     2      > FE_RESET_R                                       $8      !0, ->23
          3    > > FE_FETCH_R                                               $8, !2, ->23
    8     4    >   FETCH_DIM_R                                      ~9      !2, 'keywords'
          5      > FE_RESET_R                                       $10     ~9, ->21
          6    > > FE_FETCH_R                                               $10, !3, ->21
    9     7    >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F6k1pJ%3A9%240'
          8        BIND_LEXICAL                                             ~11, !3
          9        ASSIGN                                                   !4, ~11
   10    10        FETCH_DIM_R                                      ~13     !2, 'name'
         11        INIT_FCALL                                               'array_push'
         12        INIT_FCALL                                               'array_filter'
         13        SEND_VAR                                                 !5
         14        SEND_VAR                                                 !4
         15        DO_ICALL                                         $15     
         16        SEND_VAR_NO_REF                               0          $15
         17        DO_ICALL                                         $16     
         18        ASSIGN_DIM                                               !1, ~13
         19        OP_DATA                                                  $16
    8    20      > JMP                                                      ->6
         21    >   FE_FREE                                                  $10
    7    22      > JMP                                                      ->3
         23    >   FE_FREE                                                  $8
   12    24      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F6k1pJ%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6k1pJ
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $var, !1 = $keyword
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'preg_match'
          3        ROPE_INIT                                     3  ~3      '%2F%5Cb'
          4        ROPE_ADD                                      1  ~3      ~3, !1
          5        ROPE_END                                      2  ~2      ~3, '%5Cb%2Fi'
          6        SEND_VAL                                                 ~2
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $5      
          9      > RETURN                                                   $5
         10*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F6k1pJ%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.52 ms | 1405 KiB | 19 Q