3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @param DateTime $date * @return bool */ function firstDayOfMonth(\DateTime $date) { return (int)$date->format('d') <= 7; } $day = new \DateTime('2013/9/2'); var_dump(firstDayOfMonth($day));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oBv6H
function name:  (null)
number of ops:  11
compiled vars:  !0 = $day
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'DateTime'
          1        SEND_VAL_EX                                              '2013%2F9%2F2'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   12     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'firstdayofmonth'
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0  $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function firstdayofmonth:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oBv6H
function name:  firstDayOfMonth
number of ops:  8
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        INIT_METHOD_CALL                                         !0, 'format'
          2        SEND_VAL_EX                                              'd'
          3        DO_FCALL                                      0  $1      
          4        CAST                                          4  ~2      $1
          5        IS_SMALLER_OR_EQUAL                              ~3      ~2, 7
          6      > RETURN                                                   ~3
    9     7*     > RETURN                                                   null

End of function firstdayofmonth

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.08 ms | 1397 KiB | 16 Q