3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Test { public $var = 'test'; public function show_var() { echo $this->var; } } class Test_2 { protected $test; public function __construct() { $this->test = new Test; } public function show_test() { $this->test->show_var(); } } $test_2 = new Test_2; $test_2->show_test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OWmC9
function name:  (null)
number of ops:  6
compiled vars:  !0 = $test_2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   23     0  E >   NEW                                                  $1      'Test_2'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   25     3        INIT_METHOD_CALL                                             !0, 'show_test'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

Class Test:
Function show_var:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OWmC9
function name:  show_var
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_R                                          ~0      'var'
          1        ECHO                                                         ~0
    8     2      > RETURN                                                       null

End of function show_var

End of class Test.

Class Test_2:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OWmC9
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   NEW                                                  $1      'Test'
          1        DO_FCALL                                          0          
          2        ASSIGN_OBJ                                                   'test'
          3        OP_DATA                                                      $1
   16     4      > RETURN                                                       null

End of function __construct

Function show_test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OWmC9
function name:  show_test
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   19     0  E >   FETCH_OBJ_R                                          ~0      'test'
          1        INIT_METHOD_CALL                                             ~0, 'show_var'
          2        DO_FCALL                                          0          
   20     3      > RETURN                                                       null

End of function show_test

End of class Test_2.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.58 ms | 2253 KiB | 13 Q