3v4l.org

run code in 300+ PHP versions simultaneously
<?php $firstday = date("Y-m-01",strtotime($date)); //取得指定时间所属月的最后一天 $lastday = date("Y-m-d",strtotime("$firstday +1 month -1 day")); echo $lastday ;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hPA04
function name:  (null)
number of ops:  20
compiled vars:  !0 = $firstday, !1 = $date, !2 = $lastday
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'Y-m-01'
          2        INIT_FCALL                                               'strtotime'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $3      
          5        SEND_VAR                                                 $3
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !0, $4
    5     8        INIT_FCALL                                               'date'
          9        SEND_VAL                                                 'Y-m-d'
         10        INIT_FCALL                                               'strtotime'
         11        NOP                                                      
         12        FAST_CONCAT                                      ~6      !0, '+%2B1+month+-1+day'
         13        SEND_VAL                                                 ~6
         14        DO_ICALL                                         $7      
         15        SEND_VAR                                                 $7
         16        DO_ICALL                                         $8      
         17        ASSIGN                                                   !2, $8
    7    18        ECHO                                                     !2
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.78 ms | 1395 KiB | 17 Q