3v4l.org

run code in 500+ PHP versions simultaneously
<?php $month_number = "08"; $month_year = "2016"; echo "<div class=\"item"; // the ternary aspect: $month_result = ($month_number === "09"); $year_result = ($month_year === "2017"); echo ($month_result && $year_result)? "active":""; echo "\"></div>";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/lkHdq
function name:  (null)
number of ops:  16
compiled vars:  !0 = $month_number, !1 = $month_year, !2 = $month_result, !3 = $year_result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '08'
    3     1        ASSIGN                                                       !1, '2016'
    5     2        ECHO                                                         '%3Cdiv+class%3D%22item'
    8     3        IS_IDENTICAL                                         ~6      !0, '09'
          4        ASSIGN                                                       !2, ~6
    9     5        IS_IDENTICAL                                         ~8      !1, '2017'
          6        ASSIGN                                                       !3, ~8
   10     7      > JMPZ_EX                                              ~10     !2, ->9
          8    >   BOOL                                                 ~10     !3
          9    > > JMPZ                                                         ~10, ->12
         10    >   QM_ASSIGN                                            ~11     'active'
         11      > JMP                                                          ->13
         12    >   QM_ASSIGN                                            ~11     ''
         13    >   ECHO                                                         ~11
   12    14        ECHO                                                         '%22%3E%3C%2Fdiv%3E'
         15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.84 ms | 2569 KiB | 13 Q