3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = strtotime('2014-01-15'); $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/IJLnE
function name:  (null)
number of ops:  37
compiled vars:  !0 = $date, !1 = $daysbefor1979, !2 = $start, !3 = $diff, !4 = $days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '2014-01-15'
          2        DO_ICALL                                         $5      
          3        ASSIGN                                                   !0, $5
    4     4        ASSIGN                                                   !0, '2014-01-15'
    5     5        ASSIGN                                                   !1, '25568'
    6     6        INIT_FCALL                                               'strtotime'
          7        SEND_VAL                                                 '1900-01-01'
          8        DO_ICALL                                         $9      
          9        ASSIGN                                                   !2, $9
    7    10        ECHO                                                     !2
    8    11        SUB                                              ~11     !0, !2
         12        ASSIGN                                                   !3, ~11
    9    13        DIV                                              ~13     !3, 86400
         14        ASSIGN                                                   !4, ~13
   11    15        INIT_FCALL                                               'date'
         16        SEND_VAL                                                 'Y-m-d'
         17        INIT_FCALL_BY_NAME                                       'jdtounix'
         18        INIT_FCALL_BY_NAME                                       'gregoriantojd'
         19        SEND_VAL_EX                                              12
         20        SEND_VAL_EX                                              31
         21        SEND_VAL_EX                                              1899
         22        DO_FCALL                                      0  $15     
         23        ADD                                              ~16     $15, 41603
         24        SEND_VAL_EX                                              ~16
         25        DO_FCALL                                      0  $17     
         26        SEND_VAR                                                 $17
         27        DO_ICALL                                         $18     
         28        CONCAT                                           ~19     $18, '%0A'
         29        ECHO                                                     ~19
   12    30        INIT_FCALL                                               'round'
         31        ADD                                              ~20     !1, !4
         32        SEND_VAL                                                 ~20
         33        SEND_VAL                                                 0
         34        DO_ICALL                                         $21     
         35        ECHO                                                     $21
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.52 ms | 1400 KiB | 19 Q