3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$favcolor=array('"red",','"blue"'); //$arr=array(print_r (array_values( $favcolor))); //rint_r (array_values( $arr)); $arrR=array("red","blue"); $QW=in_array("red",$arrR); $QA=in_array("blue",$arrR); if ($QW+$QA>1) { $QW="TRUE";} else{$QW="FALSE";}; ECHO $QW; switch ($QW) { case "TRUE": echo "Your favorite color is red!"; case "TRUE": echo "Your favorite color is blue!"; case "FALSE": echo "Your favorite color is green!"; break; default: echo "Your favorite color is neither red, blue, or green!"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
4 jumps found. (Code = 188) Position 1 = 26, Position 2 = 28, Position 3 = 30, Position 4 = 19
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 26
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 27
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 28
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 28
Branch analysis from position: 27
Branch analysis from position: 26
Branch analysis from position: 16
4 jumps found. (Code = 188) Position 1 = 26, Position 2 = 28, Position 3 = 30, Position 4 = 19
Branch analysis from position: 26
Branch analysis from position: 28
Branch analysis from position: 30
Branch analysis from position: 19
filename:       /in/loN83
function name:  (null)
number of ops:  32
compiled vars:  !0 = $arrR, !1 = $QW, !2 = $QA
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'in_array'
          2        SEND_VAL                                                 'red'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    9     6        INIT_FCALL                                               'in_array'
          7        SEND_VAL                                                 'blue'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
   10    11        ADD                                              ~8      !1, !2
         12        IS_SMALLER                                               1, ~8
         13      > JMPZ                                                     ~9, ->16
   11    14    >   ASSIGN                                                   !1, 'TRUE'
         15      > JMP                                                      ->17
   12    16    >   ASSIGN                                                   !1, 'FALSE'
   13    17    >   ECHO                                                     !1
   14    18      > SWITCH_STRING                                            !1, [ 'TRUE':->26, 'FALSE':->28, ], ->30
   17    19    >   IS_EQUAL                                                 !1, 'TRUE'
         20      > JMPNZ                                                    ~12, ->26
   19    21    >   IS_EQUAL                                                 !1, 'TRUE'
         22      > JMPNZ                                                    ~12, ->27
   21    23    >   IS_EQUAL                                                 !1, 'FALSE'
         24      > JMPNZ                                                    ~12, ->28
         25    > > JMP                                                      ->30
   18    26    >   ECHO                                                     'Your+favorite+color+is+red%21'
   20    27    >   ECHO                                                     'Your+favorite+color+is+blue%21'
   22    28    >   ECHO                                                     'Your+favorite+color+is+green%21'
   23    29      > JMP                                                      ->31
   25    30    >   ECHO                                                     'Your+favorite+color+is+neither+red%2C+blue%2C+or+green%21'
   27    31    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.24 ms | 1405 KiB | 15 Q