3v4l.org

run code in 300+ PHP versions simultaneously
<?php $meses = array(); $meses[date('Y').'-01'] = 'ENERO '.date('Y'); $meses[date('Y').'-02'] = 'FEBRERO '.date('Y'); $meses[date('Y').'-03'] = 'MARZO '.date('Y'); $meses[date('Y').'-04'] = 'ABRIL '.date('Y'); $meses[date('Y').'-05'] = 'MAYO '.date('Y'); $meses[date('Y').'-06'] = 'JUNIO '.date('Y'); $meses[date('Y').'-07'] = 'JULIO '.date('Y'); $meses[date('Y').'-08'] = 'AGOSTO '.date('Y'); $meses[date('Y').'-09'] = 'SEPTIEMBRE '.date('Y'); $meses[date('Y').'-10'] = 'OCTUBRE '.date('Y'); $meses[date('Y').'-11'] = 'NOVIEMBRE '.date('Y'); $meses[date('Y').'-12'] = 'DICIEMBRE '.date('Y'); var_dump($meses);
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
array(12) { ["2014-01"]=> string(10) "ENERO 2014" ["2014-02"]=> string(12) "FEBRERO 2014" ["2014-03"]=> string(10) "MARZO 2014" ["2014-04"]=> string(10) "ABRIL 2014" ["2014-05"]=> string(9) "MAYO 2014" ["2014-06"]=> string(10) "JUNIO 2014" ["2014-07"]=> string(10) "JULIO 2014" ["2014-08"]=> string(11) "AGOSTO 2014" ["2014-09"]=> string(15) "SEPTIEMBRE 2014" ["2014-10"]=> string(12) "OCTUBRE 2014" ["2014-11"]=> string(14) "NOVIEMBRE 2014" ["2014-12"]=> string(14) "DICIEMBRE 2014" }

preferences:
206.13 ms | 407 KiB | 384 Q