1

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.

aprea
  • 109
  • 1
  • 2
  • 12

1 Answers1

0

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/

arturomp
  • 28,790
  • 10
  • 43
  • 72
Szpadel
  • 61
  • 3