3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bla($span){ echo "blah ",$span,"\n"; } function blee($f){ return $f(); } $howlong = 'for here and now'; $f = function() use($howlong){ $howlong .= ' ...'; bla($howlong); }; blee( $f ); blee("bla");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O82S5
function name:  (null)
number of ops:  11
compiled vars:  !0 = $howlong, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 'for+here+and+now'
   11     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FO82S5%3A11%240'
          2        BIND_LEXICAL                                             ~3, !0
          3        ASSIGN                                                   !1, ~3
   16     4        INIT_FCALL                                               'blee'
          5        SEND_VAR                                                 !1
          6        DO_FCALL                                      0          
   17     7        INIT_FCALL                                               'blee'
          8        SEND_VAL                                                 'bla'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function bla:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O82S5
function name:  bla
number of ops:  5
compiled vars:  !0 = $span
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ECHO                                                     'blah+'
          2        ECHO                                                     !0
          3        ECHO                                                     '%0A'
    5     4      > RETURN                                                   null

End of function bla

Function blee:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O82S5
function name:  blee
number of ops:  5
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_DYNAMIC_CALL                                        !0
          2        DO_FCALL                                      0  $1      
          3      > RETURN                                                   $1
    8     4*     > RETURN                                                   null

End of function blee

Function %00%7Bclosure%7D%2Fin%2FO82S5%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O82S5
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $howlong
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   BIND_STATIC                                              !0
   12     1        ASSIGN_OP                                     8          !0, '+...'
   13     2        INIT_FCALL                                               'bla'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0          
   14     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FO82S5%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.28 ms | 1399 KiB | 16 Q