3v4l.org

run code in 300+ PHP versions simultaneously
<?php const STATUS_SUCCESS = 'success'; const STATUS_FAILED = 'failed'; const STATUS_PENDING = 'pending'; const STATUS_CHARGEBACK = 'chargeback'; const STATUS_CANCELED = 'canceled'; $status = 'sdfasdf'; switch ($status) { case STATUS_FAILED: case STATUS_CANCELED: case STATUS_CHARGEBACK: var_dump('asdfasdf'); break; case STATUS_PENDING: case STATUS_SUCCESS: var_dump('dsfgdf'); break; default: throw new \InvalidArgumentException(sprintf("Unknown transaction response status: '%s'", $status)); break; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 22
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 22
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 26
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 26
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
Branch analysis from position: 22
Branch analysis from position: 22
filename:       /in/NmC8K
function name:  (null)
number of ops:  40
compiled vars:  !0 = $status
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'STATUS_SUCCESS', 'success'
    4     1        DECLARE_CONST                                            'STATUS_FAILED', 'failed'
    5     2        DECLARE_CONST                                            'STATUS_PENDING', 'pending'
    6     3        DECLARE_CONST                                            'STATUS_CHARGEBACK', 'chargeback'
    7     4        DECLARE_CONST                                            'STATUS_CANCELED', 'canceled'
    9     5        ASSIGN                                                   !0, 'sdfasdf'
   12     6        FETCH_CONSTANT                                   ~3      'STATUS_FAILED'
          7        IS_EQUAL                                                 !0, ~3
          8      > JMPNZ                                                    ~2, ->22
   13     9    >   FETCH_CONSTANT                                   ~4      'STATUS_CANCELED'
         10        IS_EQUAL                                                 !0, ~4
         11      > JMPNZ                                                    ~2, ->22
   14    12    >   FETCH_CONSTANT                                   ~5      'STATUS_CHARGEBACK'
         13        IS_EQUAL                                                 !0, ~5
         14      > JMPNZ                                                    ~2, ->22
   17    15    >   FETCH_CONSTANT                                   ~6      'STATUS_PENDING'
         16        IS_EQUAL                                                 !0, ~6
         17      > JMPNZ                                                    ~2, ->26
   18    18    >   FETCH_CONSTANT                                   ~7      'STATUS_SUCCESS'
         19        IS_EQUAL                                                 !0, ~7
         20      > JMPNZ                                                    ~2, ->26
         21    > > JMP                                                      ->30
   15    22    >   INIT_FCALL                                               'var_dump'
         23        SEND_VAL                                                 'asdfasdf'
         24        DO_ICALL                                                 
   16    25      > JMP                                                      ->39
   19    26    >   INIT_FCALL                                               'var_dump'
         27        SEND_VAL                                                 'dsfgdf'
         28        DO_ICALL                                                 
   20    29      > JMP                                                      ->39
   22    30    >   NEW                                              $10     'InvalidArgumentException'
         31        INIT_FCALL                                               'sprintf'
         32        SEND_VAL                                                 'Unknown+transaction+response+status%3A+%27%25s%27'
         33        SEND_VAR                                                 !0
         34        DO_ICALL                                         $11     
         35        SEND_VAR_NO_REF_EX                                       $11
         36        DO_FCALL                                      0          
         37      > THROW                                         0          $10
   23    38*       JMP                                                      ->39
   24    39    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.84 ms | 1400 KiB | 17 Q