3v4l.org

run code in 300+ PHP versions simultaneously
<?php // todays date $today = date("Ymd"); function ageChange(){ list($year,$month,$day) = explode("-", $birth_date); $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; } //Call the age function ageChange();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uLTic
function name:  (null)
number of ops:  7
compiled vars:  !0 = $today
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'Ymd'
          2        DO_ICALL                                         $1      
          3        ASSIGN                                                   !0, $1
   17     4        INIT_FCALL                                               'agechange'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function agechange

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.34 ms | 1394 KiB | 18 Q