3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bithdayDate = "1993-08-20"; $tdate = strtotime(date("Y-m-d")); $age = 0; while( $tdate > $dob = strtotime('+1 year', $bithdayDate)) { ++$age; } echo $age;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 10
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 10
Branch analysis from position: 18
Branch analysis from position: 10
filename:       /in/JYWCq
function name:  (null)
number of ops:  20
compiled vars:  !0 = $bithdayDate, !1 = $tdate, !2 = $age, !3 = $dob
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '1993-08-20'
    4     1        INIT_FCALL                                               'strtotime'
          2        INIT_FCALL                                               'date'
          3        SEND_VAL                                                 'Y-m-d'
          4        DO_ICALL                                         $5      
          5        SEND_VAR                                                 $5
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
    5     8        ASSIGN                                                   !2, 0
    6     9      > JMP                                                      ->11
    8    10    >   PRE_INC                                                  !2
    6    11    >   INIT_FCALL                                               'strtotime'
         12        SEND_VAL                                                 '%2B1+year'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $10     
         15        ASSIGN                                           ~11     !3, $10
         16        IS_SMALLER                                               ~11, !1
         17      > JMPNZ                                                    ~12, ->10
   10    18    >   ECHO                                                     !2
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.47 ms | 1395 KiB | 17 Q