int|float for DateTime::setTimestamp

From: Date: Wed, 14 Feb 2024 00:06:11 +0000
Subject: int|float for DateTime::setTimestamp
Groups: php.internals 
Request: Send a blank email to internals+get-122364@lists.php.net to get a copy of this message
just like the constructor accepts new DateTime("@0.123456"); // 1970-01-01 00:00:00.123456 new DateTime("@".microtime(true)); IMO setTimestamp should accept the same: $dt->setTimestamp(0.123456); // 1970-01-01 00:00:00.123456 $dt->setTimestamp(microtime(true)); Can we change setTimestamp to accept int|float? made a PR https://github.com/php/php-src/pull/13383

« previous php.internals (#122364) next »