Search results
From the blog
Posted 2026-04-16
PHP DateTimeImmutable::createFromFormat Reset Character
I was recently building something that was taking date input from an HTML form field, and casting it to a PHP DateTimeImmutable. I was then comparing that to another date, and got thrown off during testing when I compared the resulting instance to new DateTimeImmutable('today'); the instances were not considered equal.
Search tips
- Use
#{some tag}ortag:{some tag}to filter by tag; using this more than once will find results that match all tags. - Use
year:{year}to filter by year. If you use this multiple times, the last one wins. - Use
begin:{year-month-day}to restrict to results beginning on that day. Last one wins. - Use
end:{year-month-day}to restrict to results ending on that day. Last one wins.