3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = strtotime('1900-01-01 00:00:00'); $dates = array('2013-01-01 00:01:59', '2013-01-03 11:12:05', '2012-10-28 23:07:06'); foreach ($dates as $d) { $timestamp = strtotime($d); echo $timestamp - $start.PHP_EOL; echo ($timestamp - $start)/(60*60*24).PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 19
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/Xe9uj
function name:  (null)
number of ops:  21
compiled vars:  !0 = $start, !1 = $dates, !2 = $d, !3 = $timestamp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '1900-01-01+00%3A00%3A00'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    3     4        ASSIGN                                                   !1, <array>
    4     5      > FE_RESET_R                                       $7      !1, ->19
          6    > > FE_FETCH_R                                               $7, !2, ->19
    5     7    >   INIT_FCALL                                               'strtotime'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !3, $8
    6    11        SUB                                              ~10     !3, !0
         12        CONCAT                                           ~11     ~10, '%0A'
         13        ECHO                                                     ~11
    7    14        SUB                                              ~12     !3, !0
         15        DIV                                              ~13     ~12, 86400
         16        CONCAT                                           ~14     ~13, '%0A'
         17        ECHO                                                     ~14
    4    18      > JMP                                                      ->6
         19    >   FE_FREE                                                  $7
    8    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.65 ms | 1395 KiB | 15 Q