3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Everything you enter here will be executed by our servers. Try it! $months = array('jan', 'feb', 'mar', 'april', 'may'); print_r($months); array_push($months, 'june'); print_r($months); $months [] = 'july'; print_r($months); ?>
Output for 4.3.0 - 7.1.0
Array ( [0] => jan [1] => feb [2] => mar [3] => april [4] => may ) Array ( [0] => jan [1] => feb [2] => mar [3] => april [4] => may [5] => june ) Array ( [0] => jan [1] => feb [2] => mar [3] => april [4] => may [5] => june [6] => july )