3v4l.org

run code in 300+ PHP versions simultaneously
<?php class trick { function doit() { print_r(__CLASS__); } function doitagain() { print_r(get_class($this)); } } $obj=new trick(); $obj->doit(); $obj->doitagain();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cE0d9
function name:  (null)
number of ops:  8
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'trick'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'doit'
          4        DO_FCALL                                      0          
   17     5        INIT_METHOD_CALL                                         !0, 'doitagain'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function doit

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

End of function doitagain

End of class trick.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.76 ms | 1395 KiB | 15 Q