3v4l.org

run code in 300+ PHP versions simultaneously
<?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'), ); $newArray = array(); foreach($array as $inner_array) { $newArray[] = str_replace("N/A", 0, $inner_array); } print_r($newArray);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $array in /in/ZMZYJ on line 14 Warning: foreach() argument must be of type array|object, null given in /in/ZMZYJ on line 14 Array ( )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
52.94 ms | 401 KiB | 8 Q