3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('ON_FR', true); foreach (['dev', 'staging', 'production'] as $env) { if (! in_array($env, ['dev', 'staging']) && ! (ON_FR && $env === 'production')) { echo 'we are on ' . $env; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 18
Branch analysis from position: 13
Branch analysis from position: 15
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/ruMRK
function name:  (null)
number of ops:  21
compiled vars:  !0 = $env
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'ON_FR'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                                 
    4     4      > FE_RESET_R                                       $2      <array>, ->19
          5    > > FE_FETCH_R                                               $2, !0, ->19
    5     6    >   IN_ARRAY                                         ~3      !0, <array>
          7        BOOL_NOT                                         ~4      ~3
          8      > JMPZ_EX                                          ~4      ~4, ->15
          9    >   FETCH_CONSTANT                                   ~5      'ON_FR'
         10      > JMPZ_EX                                          ~5      ~5, ->13
         11    >   IS_IDENTICAL                                     ~6      !0, 'production'
         12        BOOL                                             ~5      ~6
         13    >   BOOL_NOT                                         ~7      ~5
         14        BOOL                                             ~4      ~7
         15    > > JMPZ                                                     ~4, ->18
    6    16    >   CONCAT                                           ~8      'we+are+on+', !0
         17        ECHO                                                     ~8
    4    18    > > JMP                                                      ->5
         19    >   FE_FREE                                                  $2
    8    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.22 ms | 1400 KiB | 15 Q