| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2016-01-26 11:54 UTC] qdinar at gmail dot com
  [2016-01-26 13:59 UTC] rasmus@php.net
 
-Status: Open
+Status: Not a bug
  [2016-01-26 13:59 UTC] rasmus@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 12:00:01 2025 UTC | 
Description: ------------ foreach through array of DateIntervals gives penultimate element instead of last element Test script: --------------- $intervals=array(1,2,3,4,5,6); foreach($intervals as &$interv){ $interv = new DateInterval('PT'.$interv.'M'); } $time = new DateTime('6:20'); foreach($intervals as $interv){ echo ','.$interv->format('%i'); } Expected result: ---------------- ,1,2,3,4,5,6 Actual result: -------------- ,1,2,3,4,5,5