3v4l.org

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

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uPIcm
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/uPIcm
function name:  printX
number of ops:  5
compiled vars:  !0 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
   12     1        FETCH_OBJ_R                                          ~1      !0, 'x'
          2        CONCAT                                               ~2      ~1, '%0A'
          3        ECHO                                                         ~2
   13     4      > RETURN                                                       null

End of function printx

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
200.13 ms | 2236 KiB | 13 Q