3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lastmonday = strtotime('last monday of this month'); $lmonday = date('Y-m-d',$lastmonday); $firstday = strtotime('first day of this month'); $fday = date('Y-m-d',$firstday); echo $lmonday; echo $fday; // $d1 = new DateTime($lmonday); // $dd1 = $d1->format('Y-m-d'); // $d2 = new DateTime($fday); // $dd2 = $d2->format('Y-m-d'); // $period_serv = $dd1->diff($dd2); // $theperiod = $period_serv->format('%a'); //echo $theperiod;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1O82F
function name:  (null)
number of ops:  21
compiled vars:  !0 = $lastmonday, !1 = $lmonday, !2 = $firstday, !3 = $fday
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 'last+monday+of+this+month'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    5     4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'Y-m-d'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !1, $6
    8     9        INIT_FCALL                                               'strtotime'
         10        SEND_VAL                                                 'first+day+of+this+month'
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !2, $8
   10    13        INIT_FCALL                                               'date'
         14        SEND_VAL                                                 'Y-m-d'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $10     
         17        ASSIGN                                                   !3, $10
   12    18        ECHO                                                     !1
   13    19        ECHO                                                     !3
   24    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.16 ms | 1395 KiB | 17 Q