3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! class A { private function test() { echo 'TEST'; } } class B extends A { protected $proxy; public function __construct($proxy) { } } $a = new B(new B(null)); $a->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mt2J9
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'B'
          1        NEW                                              $2      'B'
          2        SEND_VAL_EX                                              null
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $2
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $1
   18     7        INIT_METHOD_CALL                                         !0, 'test'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function test

End of class A.

Class B:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mt2J9
function name:  __construct
number of ops:  2
compiled vars:  !0 = $proxy
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1      > RETURN                                                   null

End of function __construct

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

End of function test

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.62 ms | 1394 KiB | 13 Q