October 22, 2024
Chicago 12, Melborne City, USA
PHP

PHP : Date difference logically best way


I need to calculate two date’s difference in days, Where one date is fixed (i.e. first day of month ). Another date would be today’s date. I know how to calculate difference between it. But I want to know which one would be 100% effective, using DateTime::diff() or using date('d') function.

Anyone help me out to figure out which one would be more optimised and in any situation or any date it should be workable!!



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video