3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.47 ms | 1394 KiB | 13 Q