3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private function privateMethod () { echo 'test'; } public function test () { Bar::run($this); } } class Bar { static public function run (\Foo $foo) { $foo->privateMethod(); } } $foo = new Foo; $foo->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0tUXF
function name:  (null)
number of ops:  6
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function privatemethod

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0tUXF
function name:  test
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_STATIC_METHOD_CALL                                  'Bar', 'run'
          1        FETCH_THIS                                       $0      
          2        SEND_VAR_EX                                              $0
          3        DO_FCALL                                      0          
    7     4      > RETURN                                                   null

End of function test

End of class Foo.

Class Bar:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0tUXF
function name:  run
number of ops:  4
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_METHOD_CALL                                         !0, 'privateMethod'
          2        DO_FCALL                                      0          
   13     3      > RETURN                                                   null

End of function run

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.76 ms | 1394 KiB | 13 Q