3v4l.org

run code in 300+ PHP versions simultaneously
<?php $year = 2013; $Jan1 = gmmktime(0, 0, 0, 1, 1, $year); $mydate = gmmktime(0, 0, 0, 11, 30, $year); $delta = (int)(($mydate - $Jan1) / (7 * 24 * 60 * 60)) + 1; echo 'weeknumber: ', $delta;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QCJMJ
function name:  (null)
number of ops:  27
compiled vars:  !0 = $year, !1 = $Jan1, !2 = $mydate, !3 = $delta
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 2013
    3     1        INIT_FCALL                                               'gmmktime'
          2        SEND_VAL                                                 0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 1
          6        SEND_VAL                                                 1
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !1, $5
    4    10        INIT_FCALL                                               'gmmktime'
         11        SEND_VAL                                                 0
         12        SEND_VAL                                                 0
         13        SEND_VAL                                                 0
         14        SEND_VAL                                                 11
         15        SEND_VAL                                                 30
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $7      
         18        ASSIGN                                                   !2, $7
    5    19        SUB                                              ~9      !2, !1
         20        DIV                                              ~10     ~9, 604800
         21        CAST                                          4  ~11     ~10
         22        ADD                                              ~12     ~11, 1
         23        ASSIGN                                                   !3, ~12
    6    24        ECHO                                                     'weeknumber%3A+'
         25        ECHO                                                     !3
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.93 ms | 1395 KiB | 15 Q