3v4l.org

run code in 300+ PHP versions simultaneously
<?php $status = 2; //if ($status >> 2 & 0x1 == 1) { // $statustext = "Høj temp. alarm"; //} else if ($status >> 1 & 0x1 == 1) { // $statustext = "Lav temp. alarm"; //} else if ($status >> 0 & 0x1 == 1) { // $statustext = "OK"; //} else { // sensor error // $statustext = "Føler fejl"; //} if (($status & 0x1) == 0) { $statustext = "Føler fejl"; } else if (($status >> 3 & 0x1) > 0) { $statustext = "Føler batteri lavt niveau"; } else if (($status >> 2 & 0x1) > 0) { $statustext = "Høj temp. alarm"; } else if (($status >> 1 & 0x1) > 0) { $statustext = "Lav temp. alarm"; } else { // sensor OK $statustext = "OK"; } echo $statustext;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2Ku8D
function name:  (null)
number of ops:  27
compiled vars:  !0 = $status, !1 = $statustext
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2
   15     1        BW_AND                                           ~3      !0, 1
          2        IS_EQUAL                                                 ~3, 0
          3      > JMPZ                                                     ~4, ->6
   16     4    >   ASSIGN                                                   !1, 'F%C3%B8ler+fejl'
          5      > JMP                                                      ->25
   17     6    >   SR                                               ~6      !0, 3
          7        BW_AND                                           ~7      ~6, 1
          8        IS_SMALLER                                               0, ~7
          9      > JMPZ                                                     ~8, ->12
   18    10    >   ASSIGN                                                   !1, 'F%C3%B8ler+batteri+lavt+niveau'
         11      > JMP                                                      ->25
   19    12    >   SR                                               ~10     !0, 2
         13        BW_AND                                           ~11     ~10, 1
         14        IS_SMALLER                                               0, ~11
         15      > JMPZ                                                     ~12, ->18
   20    16    >   ASSIGN                                                   !1, 'H%C3%B8j+temp.+alarm'
         17      > JMP                                                      ->25
   21    18    >   SR                                               ~14     !0, 1
         19        BW_AND                                           ~15     ~14, 1
         20        IS_SMALLER                                               0, ~15
         21      > JMPZ                                                     ~16, ->24
   22    22    >   ASSIGN                                                   !1, 'Lav+temp.+alarm'
         23      > JMP                                                      ->25
   24    24    >   ASSIGN                                                   !1, 'OK'
   27    25    >   ECHO                                                     !1
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.58 ms | 1395 KiB | 13 Q