3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { function b() { $pa = '1'; $func = function() use ($pa) { $this->property = $pa; }; } } a::b();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KeDqJ
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_STATIC_METHOD_CALL                                  'a', 'b'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FKeDqJ%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KeDqJ
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $pa
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   BIND_STATIC                                              !0
    6     1        FETCH_THIS                                       $1      
          2        ASSIGN_OBJ                                               $1, 'property'
          3        OP_DATA                                                  !0
    7     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FKeDqJ%3A5%240

Class a:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KeDqJ
function name:  b
number of ops:  5
compiled vars:  !0 = $pa, !1 = $func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '1'
    5     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FKeDqJ%3A5%240'
          2        BIND_LEXICAL                                             ~3, !0
          3        ASSIGN                                                   !1, ~3
    8     4      > RETURN                                                   null

End of function b

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.02 ms | 1394 KiB | 13 Q