3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo date("H:i:s Y-m-d", time()); echo "\n"; $time = time(); echo date("H:i:s Y-m-d",(date('w', $time) == 1) ? $time : strtotime('last monday', $time));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bmJ3M
function name:  (null)
number of ops:  30
compiled vars:  !0 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'H%3Ai%3As+Y-m-d'
          2        INIT_FCALL                                               'time'
          3        DO_ICALL                                         $1      
          4        SEND_VAR                                                 $1
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
    4     7        ECHO                                                     '%0A'
    5     8        INIT_FCALL                                               'time'
          9        DO_ICALL                                         $3      
         10        ASSIGN                                                   !0, $3
    6    11        INIT_FCALL                                               'date'
         12        SEND_VAL                                                 'H%3Ai%3As+Y-m-d'
         13        INIT_FCALL                                               'date'
         14        SEND_VAL                                                 'w'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $5      
         17        IS_EQUAL                                                 $5, 1
         18      > JMPZ                                                     ~6, ->21
         19    >   QM_ASSIGN                                        ~7      !0
         20      > JMP                                                      ->26
         21    >   INIT_FCALL                                               'strtotime'
         22        SEND_VAL                                                 'last+monday'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $8      
         25        QM_ASSIGN                                        ~7      $8
         26    >   SEND_VAL                                                 ~7
         27        DO_ICALL                                         $9      
         28        ECHO                                                     $9
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.99 ms | 1396 KiB | 19 Q