3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content_array = [ [123, 456, 789], [123, 456, 111], [123, 789, 789], ]; $excluded_content_pieces = array( 789 ); foreach($content_array as &$content_piece) { $content_piece = array_filter( $content_piece, function($a) use ($excluded_content_pieces) { return !in_array($a, $excluded_content_pieces); } ); } var_dump($content_array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/Ttic7
function name:  (null)
number of ops:  17
compiled vars:  !0 = $content_array, !1 = $excluded_content_pieces, !2 = $content_piece
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   12     2      > FE_RESET_RW                                      $5      !0, ->12
          3    > > FE_FETCH_RW                                              $5, !2, ->12
   13     4    >   INIT_FCALL                                               'array_filter'
   14     5        SEND_VAR                                                 !2
   15     6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FTtic7%3A15%240'
          7        BIND_LEXICAL                                             ~6, !1
   17     8        SEND_VAL                                                 ~6
          9        DO_ICALL                                         $7      
   13    10        ASSIGN                                                   !2, $7
   12    11      > JMP                                                      ->3
         12    >   FE_FREE                                                  $5
   21    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FTtic7%3A15%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ttic7
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $a, !1 = $excluded_content_pieces
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   16     2        INIT_FCALL                                               'in_array'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $2      
          6        BOOL_NOT                                         ~3      $2
          7      > RETURN                                                   ~3
   17     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FTtic7%3A15%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.65 ms | 1396 KiB | 19 Q