how to get curent date numberdatetime php code example Example 1: php get current year $currentYear=date("Y");//2019 Example 2: php get date date("Y-m-d h:i:sa")