3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array('one', 'two', 'three', new stdClass, array()); foreach($array as $key=>$value) { switch($value) { case 'one': echo 'one'; break; case 'two': echo 'two'; break; case 'three': echo 'three'; break; case is_object($value): echo 'object'; break; case is_array($value): echo 'array'; break; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 36
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 36
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 25
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 27
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 29
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 31
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 33
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/sbgcr
function name:  (null)
number of ops:  38
compiled vars:  !0 = $array, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_DYNAMIC_CALL                                        !0
          1        SEND_VAL_EX                                              'one'
          2        SEND_VAL_EX                                              'two'
          3        SEND_VAL_EX                                              'three'
          4        NEW                                              $3      'stdClass'
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $3
          7        SEND_VAL_EX                                              <array>
          8        DO_FCALL                                      0          
    5     9      > FE_RESET_R                                       $6      !0, ->36
         10    > > FE_FETCH_R                                       ~7      $6, !1, ->36
         11    >   ASSIGN                                                   !2, ~7
    7    12        IS_EQUAL                                                 !1, 'one'
         13      > JMPNZ                                                    ~9, ->25
   10    14    >   IS_EQUAL                                                 !1, 'two'
         15      > JMPNZ                                                    ~9, ->27
   13    16    >   IS_EQUAL                                                 !1, 'three'
         17      > JMPNZ                                                    ~9, ->29
   16    18    >   TYPE_CHECK                                  256  ~10     !1
         19        IS_EQUAL                                                 !1, ~10
         20      > JMPNZ                                                    ~9, ->31
   19    21    >   TYPE_CHECK                                  128  ~11     !1
         22        IS_EQUAL                                                 !1, ~11
         23      > JMPNZ                                                    ~9, ->33
         24    > > JMP                                                      ->35
    8    25    >   ECHO                                                     'one'
    9    26      > JMP                                                      ->35
   11    27    >   ECHO                                                     'two'
   12    28      > JMP                                                      ->35
   14    29    >   ECHO                                                     'three'
   15    30      > JMP                                                      ->35
   17    31    >   ECHO                                                     'object'
   18    32      > JMP                                                      ->35
   20    33    >   ECHO                                                     'array'
   21    34      > JMP                                                      ->35
    5    35    > > JMP                                                      ->10
         36    >   FE_FREE                                                  $6
   23    37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.99 ms | 1399 KiB | 13 Q