3v4l.org

run code in 300+ PHP versions simultaneously
<?php $year = '2015'; $date = '01/01/' . $year; $out = date('w', strtotime($date)) == 0 ? $date : $date + 7 - date('w', strtotime($date)); echo $out; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WdcXV
function name:  (null)
number of ops:  27
compiled vars:  !0 = $year, !1 = $date, !2 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2015'
    4     1        CONCAT                                           ~4      '01%2F01%2F', !0
          2        ASSIGN                                                   !1, ~4
    6     3        INIT_FCALL                                               'date'
          4        SEND_VAL                                                 'w'
          5        INIT_FCALL                                               'strtotime'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8        SEND_VAR                                                 $6
          9        DO_ICALL                                         $7      
         10        IS_EQUAL                                                 $7, 0
         11      > JMPZ                                                     ~8, ->14
         12    >   QM_ASSIGN                                        ~9      !1
         13      > JMP                                                      ->24
         14    >   ADD                                              ~10     !1, 7
         15        INIT_FCALL                                               'date'
         16        SEND_VAL                                                 'w'
         17        INIT_FCALL                                               'strtotime'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $11     
         20        SEND_VAR                                                 $11
         21        DO_ICALL                                         $12     
         22        SUB                                              ~13     ~10, $12
         23        QM_ASSIGN                                        ~9      ~13
         24    >   ASSIGN                                                   !2, ~9
    8    25        ECHO                                                     !2
    9    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.11 ms | 1395 KiB | 17 Q