3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { private function b() { echo "lol"; } } $a = new A(); $c = function(){ $this->b(); }; $d = $c->bindTo($a, $a); $d();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tMl5a
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $c, !2 = $d
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   NEW                                                  $3      'A'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $3
   12     3        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
          4        ASSIGN                                                       !1, ~6
   16     5        INIT_METHOD_CALL                                             !1, 'bindTo'
          6        SEND_VAR_EX                                                  !0
          7        SEND_VAR_EX                                                  !0
          8        DO_FCALL                                          0  $8      
          9        ASSIGN                                                       !2, $8
   17    10        INIT_DYNAMIC_CALL                                            !2
         11        DO_FCALL                                          0          
         12      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tMl5a
function name:  {closure:/in/tMl5a:12}
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   FETCH_THIS                                           $0      
          1        INIT_METHOD_CALL                                             $0, 'b'
          2        DO_FCALL                                          0          
   14     3      > RETURN                                                       null

End of Dynamic Function 0

Class A:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tMl5a
function name:  b
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                         'lol'
    7     1      > RETURN                                                       null

End of function b

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
192.83 ms | 3068 KiB | 13 Q