3v4l.org

run code in 300+ PHP versions simultaneously
<ul> <?php $values = array(); $values[] = array('example'=>'example1','date'=>'2016-12-25'); $values[] = array('example'=>'example2','date'=>'2016-12-26'); $values[] = array('example'=>'example3','date'=>'2016-12-28'); $values[] = array('example'=>'example4','date'=>'2016-12-30'); $previous = null; foreach($values as $example){ echo "<li>".$example['example']." - ".$example['date']; if ($previous !== null) { $diff = strtotime($example['date'])-strtotime($previous); echo " - ".($diff/(60*60*24)); } $previous = $example['date']; echo "</li>\n"; } ?> </ul>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 37
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 37
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 33
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 33
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/3H2Kq
function name:  (null)
number of ops:  40
compiled vars:  !0 = $values, !1 = $previous, !2 = $example, !3 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Cul%3E%0A'
    3     1        ASSIGN                                                   !0, <array>
    4     2        ASSIGN_DIM                                               !0
          3        OP_DATA                                                  <array>
    5     4        ASSIGN_DIM                                               !0
          5        OP_DATA                                                  <array>
    6     6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  <array>
    7     8        ASSIGN_DIM                                               !0
          9        OP_DATA                                                  <array>
    9    10        ASSIGN                                                   !1, null
   10    11      > FE_RESET_R                                       $10     !0, ->37
         12    > > FE_FETCH_R                                               $10, !2, ->37
   11    13    >   FETCH_DIM_R                                      ~11     !2, 'example'
         14        CONCAT                                           ~12     '%3Cli%3E', ~11
         15        CONCAT                                           ~13     ~12, '+-+'
         16        FETCH_DIM_R                                      ~14     !2, 'date'
         17        CONCAT                                           ~15     ~13, ~14
         18        ECHO                                                     ~15
   13    19        TYPE_CHECK                                  1020          !1
         20      > JMPZ                                                     ~16, ->33
   14    21    >   INIT_FCALL                                               'strtotime'
         22        FETCH_DIM_R                                      ~17     !2, 'date'
         23        SEND_VAL                                                 ~17
         24        DO_ICALL                                         $18     
         25        INIT_FCALL                                               'strtotime'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $19     
         28        SUB                                              ~20     $18, $19
         29        ASSIGN                                                   !3, ~20
   15    30        DIV                                              ~22     !3, 86400
         31        CONCAT                                           ~23     '+-+', ~22
         32        ECHO                                                     ~23
   18    33    >   FETCH_DIM_R                                      ~24     !2, 'date'
         34        ASSIGN                                                   !1, ~24
   19    35        ECHO                                                     '%3C%2Fli%3E%0A'
   10    36      > JMP                                                      ->12
         37    >   FE_FREE                                                  $10
   23    38        ECHO                                                     '%3C%2Ful%3E'
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.38 ms | 1400 KiB | 15 Q