3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $months = array('jan', 'feb', 'mar', 'apr', 'may'); array_push ($months, 'june'); $months[] = 'july'; $month = array_unshift($months, 'Happy New Year'); print_r($months); echo $month;
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => Happy New Year [1] => jan [2] => feb [3] => mar [4] => apr [5] => may [6] => june [7] => july ) 8