Why doesn't this work?
// works
$date = new DateInterval( 'P1Y' );
$date->y = '2';
// crashes
$date_clone = clone $date;
$date_clone->y = '2';
I get a "The connection was reset" in my browser when attempting to run this.
Why doesn't this work?
// works
$date = new DateInterval( 'P1Y' );
$date->y = '2';
// crashes
$date_clone = clone $date;
$date_clone->y = '2';
I get a "The connection was reset" in my browser when attempting to run this.
I don't see any error with your statement.
Try updating php to the latests available version
if problem still appears (if you using linux - I don't know how debug this in windows environment) run: gdb php -a
, and type your statement.
when php crashes, type bt
and report bug on https://bugs.php.net/