3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = array( array('Pedigree Dry', 'N/A', 'N/A', 'N/A'), array('Professional Range', 'N/A', 'N/A', 'N/A'), array('Pedigree Wet', 'N/A', 'N/A', 'N/A'), array('PMM', 'N/A', 'N/A', 'N/A'), array('Chappi', 'N/A', 'N/A', 'N/A'), array('Care & Treat', 'N/A', 'N/A', 'N/A'), array('Sheba', 'N/A', 'N/A', 'N/A'), array('Whiskas Dry', 'N/A', 'N/A', 'N/A'), array('Whiskas Wet', 'N/A', 'N/A', 'N/A'), ); foreach($data as $inner_array) { print_r($inner_array); str_replace("N/A", 0, $inner_array); }
based on nQR2S
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Array ( [0] => Pedigree Dry [1] => N/A [2] => N/A [3] => N/A ) Array ( [0] => Professional Range [1] => N/A [2] => N/A [3] => N/A ) Array ( [0] => Pedigree Wet [1] => N/A [2] => N/A [3] => N/A ) Array ( [0] => PMM [1] => N/A [2] => N/A [3] => N/A ) Array ( [0] => Chappi [1] => N/A [2] => N/A [3] => N/A ) Array ( [0] => Care & Treat [1] => N/A [2] => N/A [3] => N/A ) Array ( [0] => Sheba [1] => N/A [2] => N/A [3] => N/A ) Array ( [0] => Whiskas Dry [1] => N/A [2] => N/A [3] => N/A ) Array ( [0] => Whiskas Wet [1] => N/A [2] => N/A [3] => N/A )
Output for hhvm-3.10.0

Process exited with code 153.