3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Test { public function __construct($x) { $this->x = $x; } public function printX($test) { $test->privatePrintX(); } private function privatePrintX() { print $this->x; } } $test1 = new Test(123); $test2 = new Test(345); $test1->printX($test2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iH4nA
function name:  (null)
number of ops:  12
compiled vars:  !0 = $test1, !1 = $test2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   NEW                                                  $2      'Test'
          1        SEND_VAL_EX                                                  123
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $2
   22     4        NEW                                                  $5      'Test'
          5        SEND_VAL_EX                                                  345
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !1, $5
   24     8        INIT_METHOD_CALL                                             !0, 'printX'
          9        SEND_VAR_EX                                                  !1
         10        DO_FCALL                                          0          
         11      > RETURN                                                       1

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

End of function __construct

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

End of function printx

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

End of function privateprintx

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
209.82 ms | 2110 KiB | 13 Q