3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = '2014-01-15'; $daysbefor1979 = '25568'; $start = strtotime("1900-01-01"); $diff = ($date - $start); $days = ($diff / 86400); echo date('Y-m-d', jdtounix(gregoriantojd(12, 31, 1899) + 41603)).PHP_EOL; echo round(($daysbefor1979+$days), 0);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0nXet
function name:  (null)
number of ops:  32
compiled vars:  !0 = $date, !1 = $daysbefor1979, !2 = $start, !3 = $diff, !4 = $days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2014-01-15'
    4     1        ASSIGN                                                   !1, '25568'
    5     2        INIT_FCALL                                               'strtotime'
          3        SEND_VAL                                                 '1900-01-01'
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !2, $7
    6     6        SUB                                              ~9      !0, !2
          7        ASSIGN                                                   !3, ~9
    7     8        DIV                                              ~11     !3, 86400
          9        ASSIGN                                                   !4, ~11
    9    10        INIT_FCALL                                               'date'
         11        SEND_VAL                                                 'Y-m-d'
         12        INIT_FCALL_BY_NAME                                       'jdtounix'
         13        INIT_FCALL_BY_NAME                                       'gregoriantojd'
         14        SEND_VAL_EX                                              12
         15        SEND_VAL_EX                                              31
         16        SEND_VAL_EX                                              1899
         17        DO_FCALL                                      0  $13     
         18        ADD                                              ~14     $13, 41603
         19        SEND_VAL_EX                                              ~14
         20        DO_FCALL                                      0  $15     
         21        SEND_VAR                                                 $15
         22        DO_ICALL                                         $16     
         23        CONCAT                                           ~17     $16, '%0A'
         24        ECHO                                                     ~17
   10    25        INIT_FCALL                                               'round'
         26        ADD                                              ~18     !1, !4
         27        SEND_VAL                                                 ~18
         28        SEND_VAL                                                 0
         29        DO_ICALL                                         $19     
         30        ECHO                                                     $19
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.79 ms | 1396 KiB | 19 Q