3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 0 => array('user_id' => '1', 'email'=>'email1'), 1 => array('user_id' => '2', 'email'=>'email2'), 2 => array('user_id' => '3', 'email'=>'email3') ); //var_dump(array_keys($array)); $sweet = array('a' => 'apple', 'b' => 'banana'); $fruits = array('sweet' => $sweet, 'sour' => 'lemon'); function test_print($item, $key) { echo "$key holds $item\n"; } array_walk_recursive($fruits, 'test_print');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/44rgn
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array, !1 = $sweet, !2 = $fruits
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   10     2        INIT_ARRAY                                       ~5      !1, 'sweet'
          3        ADD_ARRAY_ELEMENT                                ~5      'lemon', 'sour'
          4        ASSIGN                                                   !2, ~5
   17     5        INIT_FCALL                                               'array_walk_recursive'
          6        SEND_REF                                                 !2
          7        SEND_VAL                                                 'test_print'
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function test_print:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/44rgn
function name:  test_print
number of ops:  8
compiled vars:  !0 = $item, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        ROPE_INIT                                     4  ~3      !1
          3        ROPE_ADD                                      1  ~3      ~3, '+holds+'
          4        ROPE_ADD                                      2  ~3      ~3, !0
          5        ROPE_END                                      3  ~2      ~3, '%0A'
          6        ECHO                                                     ~2
   15     7      > RETURN                                                   null

End of function test_print

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.34 ms | 1395 KiB | 15 Q