3v4l.org

run code in 300+ PHP versions simultaneously
<?php function X( $func ) { foreach ( [1,2,3,4,5] as $key => $number ) call_user_func( $func, $key, $number ); } X( function( $key, $number ) { echo $key, $number; } );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TXcRg
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'x'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FTXcRg%3A9%240'
   11     2        SEND_VAL                                                 ~0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function x:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/TXcRg
function name:  X
number of ops:  11
compiled vars:  !0 = $func, !1 = $number, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1      > FE_RESET_R                                       $3      <array>, ->9
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->9
          3    >   ASSIGN                                                   !2, ~4
    6     4        INIT_USER_CALL                                2          'call_user_func', !0
          5        SEND_USER                                                !2
          6        SEND_USER                                                !1
          7        DO_FCALL                                      0          
    5     8      > JMP                                                      ->2
          9    >   FE_FREE                                                  $3
    7    10      > RETURN                                                   null

End of function x

Function %00%7Bclosure%7D%2Fin%2FTXcRg%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TXcRg
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $key, !1 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        ECHO                                                     !0
          3        ECHO                                                     !1
   11     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FTXcRg%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.3 ms | 1390 KiB | 14 Q