3v4l.org

run code in 500+ PHP versions simultaneously
<?php function get() { return SOME_CONST; } define('sOmE_CoNsT', 1, true); echo get(); // Prints 1 define('SOME_CONST', 2); echo get(); // Prints 2
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L6nCp
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                                   'define'
          1        SEND_VAL                                                     'sOmE_CoNsT'
          2        SEND_VAL                                                     1
          3        SEND_VAL                                                     <true>
          4        DO_ICALL                                                     
    6     5        INIT_FCALL                                                   'get'
          6        DO_FCALL                                          0  $1      
          7        ECHO                                                         $1
    8     8        INIT_FCALL                                                   'define'
          9        SEND_VAL                                                     'SOME_CONST'
         10        SEND_VAL                                                     2
         11        DO_ICALL                                                     
    9    12        INIT_FCALL                                                   'get'
         13        DO_FCALL                                          0  $3      
         14        ECHO                                                         $3
         15      > RETURN                                                       1

Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L6nCp
function name:  get
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   FETCH_CONSTANT                                       ~0      'SOME_CONST'
          1      > RETURN                                                       ~0
          2*     > RETURN                                                       null

End of function get

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.29 ms | 3318 KiB | 16 Q