3v4l.org

run code in 500+ PHP versions simultaneously
<?php $date = new \DateTime('2021-02-05'); $first = $date->format("Y-m-01"); $last = $date->format("Y-m-t"); echo $first.PHP_EOL; echo $last;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X6rO9
function name:  (null)
number of ops:  16
compiled vars:  !0 = $date, !1 = $first, !2 = $last
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $3      'DateTime'
          1        SEND_VAL_EX                                                  '2021-02-05'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $3
    4     4        INIT_METHOD_CALL                                             !0, 'format'
          5        SEND_VAL_EX                                                  'Y-m-01'
          6        DO_FCALL                                          0  $6      
          7        ASSIGN                                                       !1, $6
    5     8        INIT_METHOD_CALL                                             !0, 'format'
          9        SEND_VAL_EX                                                  'Y-m-t'
         10        DO_FCALL                                          0  $8      
         11        ASSIGN                                                       !2, $8
    7    12        CONCAT                                               ~10     !1, '%0A'
         13        ECHO                                                         ~10
    8    14        ECHO                                                         !2
    9    15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
155.51 ms | 1995 KiB | 12 Q