3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = "2014-09-23 08:00:00"; $dia_inicio = date('d', strtotime($data)); $mes_inicio = (int)date('n', strtotime($data)); var_dump($mes_inicio);
based on gpqp1
Output for 4.3.0 - 7.1.0
int(9)