3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function my_array_walk(array $array, callable $cb ) { foreach ($array as $element) { $cb($element); } } my_array_walk(array('12'), function (int $element) {});
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0Nc7d
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'my_array_walk'
          1        SEND_VAL                                                 <array>
          2        DECLARE_LAMBDA_FUNCTION                          ~0      [0]
          3        SEND_VAL                                                 ~0
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0Nc7d
function name:  {closure}
number of ops:  2
compiled vars:  !0 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of Dynamic Function 0

Function my_array_walk:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/0Nc7d
function name:  my_array_walk
number of ops:  10
compiled vars:  !0 = $array, !1 = $cb, !2 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2      > FE_RESET_R                                       $3      !0, ->8
          3    > > FE_FETCH_R                                               $3, !2, ->8
    7     4    >   INIT_DYNAMIC_CALL                                        !1
          5        SEND_VAR_EX                                              !2
          6        DO_FCALL                                      0          
    6     7      > JMP                                                      ->3
          8    >   FE_FREE                                                  $3
    9     9      > RETURN                                                   null

End of function my_array_walk

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.9 ms | 998 KiB | 14 Q