3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = '2014-01-15'; $daysbefor1979 = '25568'; $start = strtotime("1900-01-01"); echo $start; $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/mn1Xn
function name:  (null)
number of ops:  33
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        ECHO                                                     !2
    7     7        SUB                                              ~9      !0, !2
          8        ASSIGN                                                   !3, ~9
    8     9        DIV                                              ~11     !3, 86400
         10        ASSIGN                                                   !4, ~11
   10    11        INIT_FCALL                                               'date'
         12        SEND_VAL                                                 'Y-m-d'
         13        INIT_FCALL_BY_NAME                                       'jdtounix'
         14        INIT_FCALL_BY_NAME                                       'gregoriantojd'
         15        SEND_VAL_EX                                              12
         16        SEND_VAL_EX                                              31
         17        SEND_VAL_EX                                              1899
         18        DO_FCALL                                      0  $13     
         19        ADD                                              ~14     $13, 41603
         20        SEND_VAL_EX                                              ~14
         21        DO_FCALL                                      0  $15     
         22        SEND_VAR                                                 $15
         23        DO_ICALL                                         $16     
         24        CONCAT                                           ~17     $16, '%0A'
         25        ECHO                                                     ~17
   11    26        INIT_FCALL                                               'round'
         27        ADD                                              ~18     !1, !4
         28        SEND_VAL                                                 ~18
         29        SEND_VAL                                                 0
         30        DO_ICALL                                         $19     
         31        ECHO                                                     $19
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.77 ms | 1396 KiB | 19 Q