3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_age($birth_date){ return floor((time() - strtotime($birth_date))/31556926); } echo " I am ".get_age("1990-12-30") ." years old";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SUsra
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'get_age'
          1        SEND_VAL                                                 '1990-12-30'
          2        DO_FCALL                                      0  $0      
          3        CONCAT                                           ~1      '+I+am+', $0
          4        CONCAT                                           ~2      ~1, '+years+old'
          5        ECHO                                                     ~2
          6      > RETURN                                                   1

Function get_age:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SUsra
function name:  get_age
number of ops:  13
compiled vars:  !0 = $birth_date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'floor'
          2        INIT_FCALL                                               'time'
          3        DO_ICALL                                         $1      
          4        INIT_FCALL                                               'strtotime'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SUB                                              ~3      $1, $2
          8        DIV                                              ~4      ~3, 31556926
          9        SEND_VAL                                                 ~4
         10        DO_ICALL                                         $5      
         11      > RETURN                                                   $5
    5    12*     > RETURN                                                   null

End of function get_age

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.49 ms | 1389 KiB | 20 Q