Is there a native function that identifies how many days does the month ?
Example:
value : 2018-08
, then return would be: 31
.
$dias = funcao('2018-08');
echo $dias; // resultado: 31
If there is no native function, how could you do it?
Before you ask: have the leap year (February 29th).