3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_r(jddayofweek(1234567, 1)); // "Saturday" print_r(jddayofweek(1234567, CAL_DOW_LONG)); // "Sat" (WRONG) print_r(CAL_DOW_LONG); // 2 print_r(jddayofweek(1234567, 2)); // "Sat" print_r(CAL_DOW_SHORT); // 1 print_r(jddayofweek(1234567, CAL_DOW_SHORT)); // "Saturday" (WRONG)
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OXRAC
function name:  (null)
number of ops:  39
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL_BY_NAME                                       'jddayofweek'
          2        SEND_VAL_EX                                              1234567
          3        SEND_VAL_EX                                              1
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
    3     7        INIT_FCALL                                               'print_r'
          8        INIT_FCALL_BY_NAME                                       'jddayofweek'
          9        SEND_VAL_EX                                              1234567
         10        FETCH_CONSTANT                                   ~2      'CAL_DOW_LONG'
         11        SEND_VAL_EX                                              ~2
         12        DO_FCALL                                      0  $3      
         13        SEND_VAR                                                 $3
         14        DO_ICALL                                                 
    4    15        INIT_FCALL                                               'print_r'
         16        FETCH_CONSTANT                                   ~5      'CAL_DOW_LONG'
         17        SEND_VAL                                                 ~5
         18        DO_ICALL                                                 
    6    19        INIT_FCALL                                               'print_r'
         20        INIT_FCALL_BY_NAME                                       'jddayofweek'
         21        SEND_VAL_EX                                              1234567
         22        SEND_VAL_EX                                              2
         23        DO_FCALL                                      0  $7      
         24        SEND_VAR                                                 $7
         25        DO_ICALL                                                 
    7    26        INIT_FCALL                                               'print_r'
         27        FETCH_CONSTANT                                   ~9      'CAL_DOW_SHORT'
         28        SEND_VAL                                                 ~9
         29        DO_ICALL                                                 
    8    30        INIT_FCALL                                               'print_r'
         31        INIT_FCALL_BY_NAME                                       'jddayofweek'
         32        SEND_VAL_EX                                              1234567
         33        FETCH_CONSTANT                                   ~11     'CAL_DOW_SHORT'
         34        SEND_VAL_EX                                              ~11
         35        DO_FCALL                                      0  $12     
         36        SEND_VAR                                                 $12
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.91 ms | 1396 KiB | 15 Q