3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array_flip(['foo_bar', 'foo_baz', 'foo_bat', 'bar_baz', 'bar_bat', 'bat_bat']); var_export($array); echo "\n"; var_export(array_filter($array, function($k) { return strpos($k, "_bat") !== FALSE; }, ARRAY_FILTER_USE_KEY));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YlMAI
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'array_flip'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                         $1      
          3        ASSIGN                                                   !0, $1
    4     4        INIT_FCALL                                               'var_export'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    5     7        ECHO                                                     '%0A'
    6     8        INIT_FCALL                                               'var_export'
          9        INIT_FCALL                                               'array_filter'
         10        SEND_VAR                                                 !0
         11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FYlMAI%3A6%240'
         12        SEND_VAL                                                 ~4
         13        SEND_VAL                                                 2
         14        DO_ICALL                                         $5      
         15        SEND_VAR                                                 $5
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.62 ms | 1395 KiB | 21 Q