3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(defined("WHATEVER_THIS_ISNT_DEFINED")){ // double quotes needed! echo 'yup, constant defined'; } else { echo 'nope, does not exist'; } if(defined('WHATEVER_THIS_ISNT_DEFINED')){ // single quotes won't suppress error notice echo 'yup, constant defined'; } else { echo 'nope, does not exist'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
Branch analysis from position: 9
filename:       /in/7M44p
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DEFINED                                                  'WHATEVER_THIS_ISNT_DEFINED'
          1      > JMPZ                                                     ~0, ->4
    3     2    >   ECHO                                                     'yup%2C+constant+defined'
          3      > JMP                                                      ->5
    7     4    >   ECHO                                                     'nope%2C+does+not+exist'
   10     5    >   DEFINED                                                  'WHATEVER_THIS_ISNT_DEFINED'
          6      > JMPZ                                                     ~1, ->9
   11     7    >   ECHO                                                     'yup%2C+constant+defined'
          8      > JMP                                                      ->10
   15     9    >   ECHO                                                     'nope%2C+does+not+exist'
   16    10    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.02 ms | 1384 KiB | 13 Q