3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_array = array( 0 => array( "name" => "john", "id" => 4 ), 1 => array( "name" => "mark", "id" => 152 ), 2 => array( "name" => "Eduard", "id" => 152 ) ); var_export( (bool)array_filter( $my_array, function ($a) { return array_key_exists('id', $a) && $a['id'] == 152; } ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2dVAu
function name:  (null)
number of ops:  11
compiled vars:  !0 = $my_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        INIT_FCALL                                               'var_export'
   19     2        INIT_FCALL                                               'array_filter'
   20     3        SEND_VAR                                                 !0
   21     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F2dVAu%3A21%240'
   23     5        SEND_VAL                                                 ~2
          6        DO_ICALL                                         $3      
          7        BOOL                                             ~4      $3
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                                 
   25    10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F2dVAu%3A21%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/2dVAu
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   22     1        ARRAY_KEY_EXISTS                                 ~1      'id', !0
          2      > JMPZ_EX                                          ~1      ~1, ->6
          3    >   FETCH_DIM_R                                      ~2      !0, 'id'
          4        IS_EQUAL                                         ~3      ~2, 152
          5        BOOL                                             ~1      ~3
          6    > > RETURN                                                   ~1
   23     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F2dVAu%3A21%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.18 ms | 1395 KiB | 17 Q