3v4l.org

run code in 500+ PHP versions simultaneously
<?php $fields = array ( 'media' => array ( 0 => '327', ), 'content' => array ( 0 => ' Custom test 1 ', 1 => ' Custom test 2 ', ), '_edit_lock' => array ( 0 => '1667908749:1', ), ); echo '<ul>'; foreach($fields as $key => $i) { if(in_array($key,array("_edit_lock", "_edit_last", "_thumbnail_id"))) continue; foreach($i as $value) { echo '<li>'.$value.'</li>'; } } echo '</ul>';
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.21, 8.5.0 - 8.5.7
<ul><li>327</li><li> Custom test 1 </li><li> Custom test 2 </li></ul>

preferences:
67.55 ms | 1261 KiB | 4 Q