3v4l.org

run code in 300+ PHP versions simultaneously
<?php function humanizeDayOfDate($date) { if( date('d.m.Y', strtotime($date)) == date('d.m.Y') ) { return 'Today'; } if( date('d.m.Y', strtotime($date)) == date('d.m.Y', strtotime('-1 day')) ) { return 'Yesterday'; } } echo humanizeDayOfDate('2013-03-04');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EmhoC
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'humanizedayofdate'
          1        SEND_VAL                                                 '2013-03-04'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function humanizedayofdate:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 31
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EmhoC
function name:  humanizeDayOfDate
number of ops:  32
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'd.m.Y'
          3        INIT_FCALL                                               'strtotime'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                         $2      
          8        INIT_FCALL                                               'date'
          9        SEND_VAL                                                 'd.m.Y'
         10        DO_ICALL                                         $3      
         11        IS_EQUAL                                                 $2, $3
         12      > JMPZ                                                     ~4, ->14
    5    13    > > RETURN                                                   'Today'
    7    14    >   INIT_FCALL                                               'date'
         15        SEND_VAL                                                 'd.m.Y'
         16        INIT_FCALL                                               'strtotime'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $5      
         19        SEND_VAR                                                 $5
         20        DO_ICALL                                         $6      
         21        INIT_FCALL                                               'date'
         22        SEND_VAL                                                 'd.m.Y'
         23        INIT_FCALL                                               'strtotime'
         24        SEND_VAL                                                 '-1+day'
         25        DO_ICALL                                         $7      
         26        SEND_VAR                                                 $7
         27        DO_ICALL                                         $8      
         28        IS_EQUAL                                                 $6, $8
         29      > JMPZ                                                     ~9, ->31
    8    30    > > RETURN                                                   'Yesterday'
   10    31    > > RETURN                                                   null

End of function humanizedayofdate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150 ms | 1394 KiB | 18 Q