3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { public $x; function myMethod() { echo $this->x; } } $a = new myClass(); $a->x = 10; $b = $a; $b->x = 20; $c = clone $b; $c->x = 30; $a->myMethod(); $b->myMethod(); $c->myMethod();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ng01k
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $3      'myClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   13     3        ASSIGN_OBJ                                               !0, 'x'
          4        OP_DATA                                                  10
   14     5        ASSIGN                                                   !1, !0
   15     6        ASSIGN_OBJ                                               !1, 'x'
          7        OP_DATA                                                  20
   16     8        CLONE                                            ~9      !1
          9        ASSIGN                                                   !2, ~9
   17    10        ASSIGN_OBJ                                               !2, 'x'
         11        OP_DATA                                                  30
   19    12        INIT_METHOD_CALL                                         !0, 'myMethod'
         13        DO_FCALL                                      0          
   20    14        INIT_METHOD_CALL                                         !1, 'myMethod'
         15        DO_FCALL                                      0          
   21    16        INIT_METHOD_CALL                                         !2, 'myMethod'
         17        DO_FCALL                                      0          
         18      > RETURN                                                   1

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

End of function mymethod

End of class myClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.66 ms | 1398 KiB | 13 Q