3v4l.org

run code in 300+ PHP versions simultaneously
<?php // In the beginning there are no Sundays counted yet $number_of_sundays = 0; // Make the following actions for all years of the twentieth century for ($current_year = 1900; $current_year <= 1999; $current_year++) { //Make the following actions for all months from January to December for ($current_month = 1; $current_month <= 12; $current_month++) { // Get Unix Timestamp of the current month and year on the first day of the month $current_date = mktime(0, 0, 0, $current_month, 01, $current_year); $get_day_of_week = date("D", $current_date); if ($get_day_of_week == "Sun") { echo "01".$current_month.$current_year."was a Sunday!"."\n"; } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 3
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 5
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 3
Branch analysis from position: 32
Branch analysis from position: 3
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 26
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 5
Branch analysis from position: 29
Branch analysis from position: 5
Branch analysis from position: 26
filename:       /in/kEE43
function name:  (null)
number of ops:  33
compiled vars:  !0 = $number_of_sundays, !1 = $current_year, !2 = $current_month, !3 = $current_date, !4 = $get_day_of_week
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    6     1        ASSIGN                                                   !1, 1900
          2      > JMP                                                      ->30
    8     3    >   ASSIGN                                                   !2, 1
          4      > JMP                                                      ->27
   10     5    >   INIT_FCALL                                               'mktime'
          6        SEND_VAL                                                 0
          7        SEND_VAL                                                 0
          8        SEND_VAL                                                 0
          9        SEND_VAR                                                 !2
         10        SEND_VAL                                                 1
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !3, $8
   12    14        INIT_FCALL                                               'date'
         15        SEND_VAL                                                 'D'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $10     
         18        ASSIGN                                                   !4, $10
   14    19        IS_EQUAL                                                 !4, 'Sun'
         20      > JMPZ                                                     ~12, ->26
   15    21    >   CONCAT                                           ~13     '01', !2
         22        CONCAT                                           ~14     ~13, !1
         23        CONCAT                                           ~15     ~14, 'was+a+Sunday%21'
         24        CONCAT                                           ~16     ~15, '%0A'
         25        ECHO                                                     ~16
    8    26    >   PRE_INC                                                  !2
         27    >   IS_SMALLER_OR_EQUAL                                      !2, 12
         28      > JMPNZ                                                    ~18, ->5
    6    29    >   PRE_INC                                                  !1
         30    >   IS_SMALLER_OR_EQUAL                                      !1, 1999
         31      > JMPNZ                                                    ~20, ->3
   18    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.65 ms | 1396 KiB | 17 Q