3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $var; function __construct($var) { $this->var = $var; } public function printVar() { echo $this->var; } } $a = new Test(5); $b = clone $a; $b->printVar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qZUEj
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'Test'
          1        SEND_VAL_EX                                              5
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   14     4        CLONE                                            ~5      !0
          5        ASSIGN                                                   !1, ~5
   15     6        INIT_METHOD_CALL                                         !1, 'printVar'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function __construct

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

End of function printvar

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.38 ms | 1393 KiB | 13 Q