3v4l.org

run code in 300+ PHP versions simultaneously
<?php $LastFridayOfMonth = date('Y-m-d', strtotime("last Friday", strtotime("2013-06-01"))); echo "$LastFridayOfMonth \r" ; $LastFridayOfMonth = date('Y-m-d', strtotime("last Friday", strtotime("06-2013"))); echo "$LastFridayOfMonth \r"; $LastFridayOfMonth = date('Y-m-d', strtotime("last Friday", strtotime("2013-06-31"))); echo "$LastFridayOfMonth \r"; echo "Correct answer : 2013-06-28 !" ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NGYmd
function name:  (null)
number of ops:  47
compiled vars:  !0 = $LastFridayOfMonth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'Y-m-d'
          2        INIT_FCALL                                               'strtotime'
          3        SEND_VAL                                                 'last+Friday'
          4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '2013-06-01'
          6        DO_ICALL                                         $1      
          7        SEND_VAR                                                 $1
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                         $3      
         11        ASSIGN                                                   !0, $3
    3    12        NOP                                                      
         13        FAST_CONCAT                                      ~5      !0, '+%0D'
         14        ECHO                                                     ~5
    5    15        INIT_FCALL                                               'date'
         16        SEND_VAL                                                 'Y-m-d'
         17        INIT_FCALL                                               'strtotime'
         18        SEND_VAL                                                 'last+Friday'
         19        INIT_FCALL                                               'strtotime'
         20        SEND_VAL                                                 '06-2013'
         21        DO_ICALL                                         $6      
         22        SEND_VAR                                                 $6
         23        DO_ICALL                                         $7      
         24        SEND_VAR                                                 $7
         25        DO_ICALL                                         $8      
         26        ASSIGN                                                   !0, $8
    6    27        NOP                                                      
         28        FAST_CONCAT                                      ~10     !0, '+%0D'
         29        ECHO                                                     ~10
    8    30        INIT_FCALL                                               'date'
         31        SEND_VAL                                                 'Y-m-d'
         32        INIT_FCALL                                               'strtotime'
         33        SEND_VAL                                                 'last+Friday'
         34        INIT_FCALL                                               'strtotime'
         35        SEND_VAL                                                 '2013-06-31'
         36        DO_ICALL                                         $11     
         37        SEND_VAR                                                 $11
         38        DO_ICALL                                         $12     
         39        SEND_VAR                                                 $12
         40        DO_ICALL                                         $13     
         41        ASSIGN                                                   !0, $13
    9    42        NOP                                                      
         43        FAST_CONCAT                                      ~15     !0, '+%0D'
         44        ECHO                                                     ~15
   11    45        ECHO                                                     'Correct+answer+%3A+2013-06-28+%21'
   12    46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.78 ms | 1400 KiB | 17 Q