3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); function diff($age) { $morgen['day'] = date('d'); $morgen['month'] = date('m'); $morgen['year'] = date('Y') - $age; $datum = $morgen['year'] .'-' .$morgen['month'].'-' .$morgen['day']; return $datum; } $minDatum = strtotime(diff(18)); $maxDatum = strtotime(diff(32)); $dob = strtotime("23/10/1989"); echo $dob."\n".$minDatum."\n".$maxDatum."\n"; if (!$dob){ //$date_of_birth = date('Y-m-d H:i:s', $minDatum); } elseif ($dob <= $maxDatum || $dob >= $minDatum){ $date_of_birth = date('Y-m-d H:i:s', $minDatum); }else{ $date_of_birth = date('Y-m-d H:i:s', $dob); } echo $date_of_birth; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 30
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
2 jumps found. (Code = 47) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 41
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/JFctJ
function name:  (null)
number of ops:  48
compiled vars:  !0 = $minDatum, !1 = $maxDatum, !2 = $dob, !3 = $date_of_birth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'UTC'
          2        DO_ICALL                                                 
   13     3        INIT_FCALL                                               'strtotime'
          4        INIT_FCALL                                               'diff'
          5        SEND_VAL                                                 18
          6        DO_FCALL                                      0  $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !0, $6
   14    10        INIT_FCALL                                               'strtotime'
         11        INIT_FCALL                                               'diff'
         12        SEND_VAL                                                 32
         13        DO_FCALL                                      0  $8      
         14        SEND_VAR                                                 $8
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !1, $9
   16    17        INIT_FCALL                                               'strtotime'
         18        SEND_VAL                                                 '23%2F10%2F1989'
         19        DO_ICALL                                         $11     
         20        ASSIGN                                                   !2, $11
   18    21        CONCAT                                           ~13     !2, '%0A'
         22        CONCAT                                           ~14     ~13, !0
         23        CONCAT                                           ~15     ~14, '%0A'
         24        CONCAT                                           ~16     ~15, !1
         25        CONCAT                                           ~17     ~16, '%0A'
         26        ECHO                                                     ~17
   20    27        BOOL_NOT                                         ~18     !2
         28      > JMPZ                                                     ~18, ->30
         29    > > JMP                                                      ->46
   22    30    >   IS_SMALLER_OR_EQUAL                              ~19     !2, !1
         31      > JMPNZ_EX                                         ~19     ~19, ->34
         32    >   IS_SMALLER_OR_EQUAL                              ~20     !0, !2
         33        BOOL                                             ~19     ~20
         34    > > JMPZ                                                     ~19, ->41
   23    35    >   INIT_FCALL                                               'date'
         36        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         37        SEND_VAR                                                 !0
         38        DO_ICALL                                         $21     
         39        ASSIGN                                                   !3, $21
         40      > JMP                                                      ->46
   25    41    >   INIT_FCALL                                               'date'
         42        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         43        SEND_VAR                                                 !2
         44        DO_ICALL                                         $23     
         45        ASSIGN                                                   !3, $23
   28    46    >   ECHO                                                     !3
   30    47      > RETURN                                                   1

Function diff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JFctJ
function name:  diff
number of ops:  27
compiled vars:  !0 = $age, !1 = $morgen, !2 = $datum
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'd'
          3        DO_ICALL                                         $4      
          4        ASSIGN_DIM                                               !1, 'day'
          5        OP_DATA                                                  $4
    6     6        INIT_FCALL                                               'date'
          7        SEND_VAL                                                 'm'
          8        DO_ICALL                                         $6      
          9        ASSIGN_DIM                                               !1, 'month'
         10        OP_DATA                                                  $6
    7    11        INIT_FCALL                                               'date'
         12        SEND_VAL                                                 'Y'
         13        DO_ICALL                                         $8      
         14        SUB                                              ~9      $8, !0
         15        ASSIGN_DIM                                               !1, 'year'
         16        OP_DATA                                                  ~9
    8    17        FETCH_DIM_R                                      ~10     !1, 'year'
         18        CONCAT                                           ~11     ~10, '-'
         19        FETCH_DIM_R                                      ~12     !1, 'month'
         20        CONCAT                                           ~13     ~11, ~12
         21        CONCAT                                           ~14     ~13, '-'
         22        FETCH_DIM_R                                      ~15     !1, 'day'
         23        CONCAT                                           ~16     ~14, ~15
         24        ASSIGN                                                   !2, ~16
    9    25      > RETURN                                                   !2
   10    26*     > RETURN                                                   null

End of function diff

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.41 ms | 1403 KiB | 21 Q