Created
January 7, 2014 00:31
-
-
Save AdrianSchneider/8292643 to your computer and use it in GitHub Desktop.
DatePeriod woes PHP 5.5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$period = new DatePeriod(new DateTime, new DateInterval('P1M'), new DateTime('+1 year')); | |
var_dump($period); // shows public $interval | |
var_dump($period->interval); // new empty DateInterval object | |
var_dump($period->interval); // new empty DateInterval object | |
// $period->interval->m undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DatePeriod#1 (6) { | |
public $start => | |
class DateTime#8 (3) { | |
public $date => | |
string(19) "2014-01-06 16:28:46" | |
public $timezone_type => | |
int(3) | |
public $timezone => | |
string(17) "America/Vancouver" | |
} | |
public $current => | |
NULL | |
public $end => | |
class DateTime#7 (3) { | |
public $date => | |
string(19) "2015-01-06 16:28:46" | |
public $timezone_type => | |
int(3) | |
public $timezone => | |
string(17) "America/Vancouver" | |
} | |
public $interval => | |
class DateInterval#6 (15) { | |
public $y => | |
int(0) | |
public $m => | |
int(1) | |
public $d => | |
int(0) | |
public $h => | |
int(0) | |
public $i => | |
int(0) | |
public $s => | |
int(0) | |
public $weekday => | |
int(0) | |
public $weekday_behavior => | |
int(0) | |
public $first_last_day_of => | |
int(0) | |
public $invert => | |
int(0) | |
public $days => | |
bool(false) | |
public $special_type => | |
int(0) | |
public $special_amount => | |
int(0) | |
public $have_weekday_relative => | |
int(0) | |
public $have_special_relative => | |
int(0) | |
} | |
public $recurrences => | |
int(1) | |
public $include_start_date => | |
bool(true) | |
} | |
class DateInterval#5 (0) { | |
} | |
class DateInterval#4 (0) { | |
} | |
NULL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment