3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 'foo'; $bar = 'bar'; $my_closure = function($something, $other) use (&$foo, $bar) { // watcha doin'? ... stuff. }; $my_closure('hello', array('one', 'two'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vVFEL
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo, !1 = $bar, !2 = $my_closure
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'foo'
    3     1        ASSIGN                                                   !1, 'bar'
    4     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FvVFEL%3A4%240'
          3        BIND_LEXICAL                                             ~5, !0
          4        BIND_LEXICAL                                             ~5, !1
          5        ASSIGN                                                   !2, ~5
    8     6        INIT_DYNAMIC_CALL                                        !2
          7        SEND_VAL_EX                                              'hello'
          8        SEND_VAL_EX                                              <array>
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FvVFEL%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vVFEL
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $something, !1 = $other, !2 = $foo, !3 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        BIND_STATIC                                              !3
    6     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FvVFEL%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.5 ms | 1393 KiB | 13 Q