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) + 42088)).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/dQPdm
function name:  (null)
number of ops:  17
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
   10    10        INIT_FCALL                                               'round'
         11        ADD                                              ~13     !1, !4
         12        SEND_VAL                                                 ~13
         13        SEND_VAL                                                 0
         14        DO_ICALL                                         $14     
         15        ECHO                                                     $14
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.5 ms | 1399 KiB | 17 Q