3v4l.org

run code in 300+ PHP versions simultaneously
<?php function x() { $a = "A happily bound"; return function() use ( $a ) { return $a .= " PHP variable"; }; } x()->__invoke();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/foIpi
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'x'
          1        DO_FCALL                                      0  $0      
          2        INIT_METHOD_CALL                                         $0, '__invoke'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/foIpi
function name:  x
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'A+happily+bound'
    7     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FfoIpi%3A7%240'
          2        BIND_LEXICAL                                             ~2, !0
    9     3      > RETURN                                                   ~2
   10     4*     > RETURN                                                   null

End of function x

Function %00%7Bclosure%7D%2Fin%2FfoIpi%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/foIpi
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   BIND_STATIC                                              !0
    8     1        ASSIGN_OP                                     8  ~1      !0, '+PHP+variable'
          2      > RETURN                                                   ~1
    9     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FfoIpi%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.6 ms | 1389 KiB | 14 Q