3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test; class trick { function doit() { print_r(__CLASS__ . "\n"); } function doitagain() { print_r(get_class($this) . "\n"); } } $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/HGYdD
function name:  (null)
number of ops:  8
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Test%5Ctrick'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'doit'
          4        DO_FCALL                                      0          
   19     5        INIT_METHOD_CALL                                         !0, 'doitagain'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class Test\trick:
Function doit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HGYdD
function name:  doit
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_NS_FCALL_BY_NAME                                    'Test%5Cprint_r'
          1        SEND_VAL_EX                                              'Test%5Ctrick%0A'
          2        DO_FCALL                                      0          
   10     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/HGYdD
function name:  doitagain
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_NS_FCALL_BY_NAME                                    'Test%5Cprint_r'
          1        INIT_NS_FCALL_BY_NAME                                    'Test%5Cget_class'
          2        FETCH_THIS                                       $0      
          3        SEND_VAR_EX                                              $0
          4        DO_FCALL                                      0  $1      
          5        CONCAT                                           ~2      $1, '%0A'
          6        SEND_VAL_EX                                              ~2
          7        DO_FCALL                                      0          
   14     8      > RETURN                                                   null

End of function doitagain

End of class Test\trick.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.31 ms | 1395 KiB | 17 Q