3v4l.org

run code in 300+ PHP versions simultaneously
<?php $objToday = new Datetime(); $objFirstOfMonth = new DateTime('first day of this month'); $intNumberOfWorkDays = 0; $obj1Day = new DateInterval('1D'); while ($objToday > $objFirstOfMonth && $intNumberOfWorkDays <= 5) { if ($objFirstOfMonth->format('N') < 6) { $intNumberOfWorkDays++; } $objFirstOfMonth = $objFirstOfMonth->add($obj1Day); } if ($intNumberOfWorkDays) { echo 'Boooyaaah!'; } else { echo $intNumberOfWorkDays; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 46) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 13
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
2 jumps found. (Code = 46) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
Branch analysis from position: 27
Branch analysis from position: 19
Branch analysis from position: 27
filename:       /in/fLPtq
function name:  (null)
number of ops:  33
compiled vars:  !0 = $objToday, !1 = $objFirstOfMonth, !2 = $intNumberOfWorkDays, !3 = $obj1Day
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'Datetime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        NEW                                              $7      'DateTime'
          4        SEND_VAL_EX                                              'first+day+of+this+month'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $7
    5     7        ASSIGN                                                   !2, 0
    6     8        NEW                                              $11     'DateInterval'
          9        SEND_VAL_EX                                              '1D'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !3, $11
    8    12      > JMP                                                      ->23
   10    13    >   INIT_METHOD_CALL                                         !1, 'format'
         14        SEND_VAL_EX                                              'N'
         15        DO_FCALL                                      0  $14     
         16        IS_SMALLER                                               $14, 6
         17      > JMPZ                                                     ~15, ->19
   12    18    >   PRE_INC                                                  !2
   14    19    >   INIT_METHOD_CALL                                         !1, 'add'
         20        SEND_VAR_EX                                              !3
         21        DO_FCALL                                      0  $17     
         22        ASSIGN                                                   !1, $17
    8    23    >   IS_SMALLER                                       ~19     !1, !0
         24      > JMPZ_EX                                          ~19     ~19, ->27
         25    >   IS_SMALLER_OR_EQUAL                              ~20     !2, 5
         26        BOOL                                             ~19     ~20
         27    > > JMPNZ                                                    ~19, ->13
   17    28    > > JMPZ                                                     !2, ->31
   19    29    >   ECHO                                                     'Boooyaaah%21'
         30      > JMP                                                      ->32
   23    31    >   ECHO                                                     !2
   24    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.46 ms | 1395 KiB | 13 Q