3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.68 ms | 1400 KiB | 19 Q