-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Process statements inside
declare(ticks=...)
- Loading branch information
1 parent
a0e0dfb
commit eb39381
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php // lint >= 8.1 | ||
|
||
namespace Bug10059; | ||
|
||
use DateTimeImmutable; | ||
|
||
class Foo | ||
{ | ||
public function __construct( | ||
private readonly DateTimeImmutable $startDateTime | ||
) { | ||
} | ||
|
||
public function bar(): void | ||
{ | ||
declare(ticks=5) { | ||
echo $this->startDateTime->format('Y-m-d H:i:s.u'), PHP_EOL; | ||
} | ||
} | ||
} |