3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f = "Y-m-d";$now = 1267571715; // 2010-03-02 echo date($f, strtotime("last Monday",$now))."\n"; echo date($f, strtotime("last Monday in March",$now))."\n"; echo date($f, strtotime("last Monday of March",$now))."\n"; echo date($f, strtotime("last Monday April",$now))."\n"; echo date($f, strtotime("last Monday in April",$now))."\n"; echo date($f, strtotime("last Monday of April",$now))."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qQVC0
function name:  (null)
number of ops:  63
compiled vars:  !0 = $f, !1 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Y-m-d'
          1        ASSIGN                                                   !1, 1267571715
    4     2        INIT_FCALL                                               'date'
          3        SEND_VAR                                                 !0
          4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 'last+Monday'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
         10        CONCAT                                           ~6      $5, '%0A'
         11        ECHO                                                     ~6
    5    12        INIT_FCALL                                               'date'
         13        SEND_VAR                                                 !0
         14        INIT_FCALL                                               'strtotime'
         15        SEND_VAL                                                 'last+Monday+in+March'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $7      
         18        SEND_VAR                                                 $7
         19        DO_ICALL                                         $8      
         20        CONCAT                                           ~9      $8, '%0A'
         21        ECHO                                                     ~9
    6    22        INIT_FCALL                                               'date'
         23        SEND_VAR                                                 !0
         24        INIT_FCALL                                               'strtotime'
         25        SEND_VAL                                                 'last+Monday+of+March'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $10     
         28        SEND_VAR                                                 $10
         29        DO_ICALL                                         $11     
         30        CONCAT                                           ~12     $11, '%0A'
         31        ECHO                                                     ~12
    7    32        INIT_FCALL                                               'date'
         33        SEND_VAR                                                 !0
         34        INIT_FCALL                                               'strtotime'
         35        SEND_VAL                                                 'last+Monday+April'
         36        SEND_VAR                                                 !1
         37        DO_ICALL                                         $13     
         38        SEND_VAR                                                 $13
         39        DO_ICALL                                         $14     
         40        CONCAT                                           ~15     $14, '%0A'
         41        ECHO                                                     ~15
    8    42        INIT_FCALL                                               'date'
         43        SEND_VAR                                                 !0
         44        INIT_FCALL                                               'strtotime'
         45        SEND_VAL                                                 'last+Monday+in+April'
         46        SEND_VAR                                                 !1
         47        DO_ICALL                                         $16     
         48        SEND_VAR                                                 $16
         49        DO_ICALL                                         $17     
         50        CONCAT                                           ~18     $17, '%0A'
         51        ECHO                                                     ~18
    9    52        INIT_FCALL                                               'date'
         53        SEND_VAR                                                 !0
         54        INIT_FCALL                                               'strtotime'
         55        SEND_VAL                                                 'last+Monday+of+April'
         56        SEND_VAR                                                 !1
         57        DO_ICALL                                         $19     
         58        SEND_VAR                                                 $19
         59        DO_ICALL                                         $20     
         60        CONCAT                                           ~21     $20, '%0A'
         61        ECHO                                                     ~21
         62      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.21 ms | 1405 KiB | 17 Q