3v4l.org

run code in 300+ PHP versions simultaneously
<?php $weekDays = json_decode('["4", "2"]'); $thisWeekDay = date("N", strtotime("2014-11-04")) - 1; if (in_array($thisWeekDay, $weekDays)) { die(1); } else { die(2); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/hfgGl
function name:  (null)
number of ops:  22
compiled vars:  !0 = $weekDays, !1 = $thisWeekDay
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%5B%224%22%2C+%222%22%5D'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    3     4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'N'
          6        INIT_FCALL                                               'strtotime'
          7        SEND_VAL                                                 '2014-11-04'
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                         $5      
         11        SUB                                              ~6      $5, 1
         12        ASSIGN                                                   !1, ~6
    5    13        INIT_FCALL                                               'in_array'
         14        SEND_VAR                                                 !1
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $8      
         17      > JMPZ                                                     $8, ->20
    7    18    > > EXIT                                                     1
         19*       JMP                                                      ->21
   11    20    > > EXIT                                                     2
   12    21*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.85 ms | 1395 KiB | 21 Q