3v4l.org

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

Class C:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cjBeF
function name:  bar
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    8     4      > RETURN                                                   null

End of function bar

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.72 ms | 1395 KiB | 15 Q