3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dob ($birthday){ list($day,$month,$year) = explode("/",$birthday); $year_diff = date("Y") - $year; $month_diff = date("m") - $month; $day_diff = date("d") - $day; if ($day_diff < 0 || $month_diff < 0) $year_diff--; return $year_diff; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XjNIP
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   1

Function dob:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 33
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
Branch analysis from position: 31
filename:       /in/XjNIP
function name:  dob
number of ops:  35
compiled vars:  !0 = $birthday, !1 = $day, !2 = $month, !3 = $year, !4 = $year_diff, !5 = $month_diff, !6 = $day_diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $7      
          5        FETCH_LIST_R                                     $8      $7, 0
          6        ASSIGN                                                   !1, $8
          7        FETCH_LIST_R                                     $10     $7, 1
          8        ASSIGN                                                   !2, $10
          9        FETCH_LIST_R                                     $12     $7, 2
         10        ASSIGN                                                   !3, $12
         11        FREE                                                     $7
    5    12        INIT_FCALL                                               'date'
         13        SEND_VAL                                                 'Y'
         14        DO_ICALL                                         $14     
         15        SUB                                              ~15     $14, !3
         16        ASSIGN                                                   !4, ~15
    6    17        INIT_FCALL                                               'date'
         18        SEND_VAL                                                 'm'
         19        DO_ICALL                                         $17     
         20        SUB                                              ~18     $17, !2
         21        ASSIGN                                                   !5, ~18
    7    22        INIT_FCALL                                               'date'
         23        SEND_VAL                                                 'd'
         24        DO_ICALL                                         $20     
         25        SUB                                              ~21     $20, !1
         26        ASSIGN                                                   !6, ~21
    8    27        IS_SMALLER                                       ~23     !6, 0
         28      > JMPNZ_EX                                         ~23     ~23, ->31
         29    >   IS_SMALLER                                       ~24     !5, 0
         30        BOOL                                             ~23     ~24
         31    > > JMPZ                                                     ~23, ->33
    9    32    >   PRE_DEC                                                  !4
   10    33    > > RETURN                                                   !4
   11    34*     > RETURN                                                   null

End of function dob

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.3 ms | 1396 KiB | 17 Q