3v4l.org

run code in 300+ PHP versions simultaneously
<?php $firstOfMonth = strtotime(date("Y-m-01", strtotime("2017-07-17"))); //Apply above formula. echo intval(date("W", $date)) - intval(date("W", $firstOfMonth)) + 1;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8TvMF
function name:  (null)
number of ops:  25
compiled vars:  !0 = $firstOfMonth, !1 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtotime'
          1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'Y-m-01'
          3        INIT_FCALL                                               'strtotime'
          4        SEND_VAL                                                 '2017-07-17'
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !0, $4
    5    11        INIT_FCALL                                               'date'
         12        SEND_VAL                                                 'W'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $6      
         15        CAST                                          4  ~7      $6
         16        INIT_FCALL                                               'date'
         17        SEND_VAL                                                 'W'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $8      
         20        CAST                                          4  ~9      $8
         21        SUB                                              ~10     ~7, ~9
         22        ADD                                              ~11     ~10, 1
         23        ECHO                                                     ~11
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.2 ms | 1399 KiB | 17 Q