3v4l.org

run code in 300+ PHP versions simultaneously
<?php class t { const A = 1; function __construct() { $r = new ReflectionClass($this); var_dump($r->hasConstant('A')); } } $t = new $t;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SG1Us
function name:  (null)
number of ops:  5
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_CLASS                                   0  $1      !0
          1        NEW                                              $2      $1
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
          4      > RETURN                                                   1

Class t:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SG1Us
function name:  __construct
number of ops:  12
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $1      'ReflectionClass'
          1        FETCH_THIS                                       $2      
          2        SEND_VAR_EX                                              $2
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
    7     5        INIT_FCALL                                               'var_dump'
          6        INIT_METHOD_CALL                                         !0, 'hasConstant'
          7        SEND_VAL_EX                                              'A'
          8        DO_FCALL                                      0  $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
    8    11      > RETURN                                                   null

End of function __construct

End of class t.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.78 ms | 1395 KiB | 15 Q