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->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/ELoDD
function name:  (null)
number of ops:  18
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $3      'myclass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   11     3        ASSIGN_OBJ                                               !0, 'x'
          4        OP_DATA                                                  10
   12     5        ASSIGN_OBJ                                               !1, 'x'
          6        OP_DATA                                                  20
   13     7        CLONE                                            ~8      !1
          8        ASSIGN                                                   !2, ~8
   14     9        ASSIGN_OBJ                                               !2, 'x'
         10        OP_DATA                                                  30
   16    11        INIT_METHOD_CALL                                         !0, 'mymethod'
         12        DO_FCALL                                      0          
   17    13        INIT_METHOD_CALL                                         !1, 'mymethod'
         14        DO_FCALL                                      0          
   18    15        INIT_METHOD_CALL                                         !2, 'mymethod'
         16        DO_FCALL                                      0          
   19    17      > RETURN                                                   1

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

End of function mymethod

End of class myclass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.44 ms | 1385 KiB | 13 Q