3v4l.org

run code in 500+ PHP versions simultaneously
<?php $csv_arr = [ 0 => (object) ["item" => 'banana', "picture" => ''], 1 => (object) ["item" => 'apple', "picture" => 'asdkls.jpg'], 2 => (object) ["item" => 'orange', "picture" => 'sda.jpg,sf.jpg,ffd.jpg'], 3 => (object) ["item" => 'pineapple', "picture" => ''], 4 => (object) ["item" => 'apricot', "picture" => ''], ]; //print_r($csv_arr); $output = array_filter($csv_arr, function($v, $k) { return !empty($v->picture); }, ARRAY_FILTER_USE_BOTH); print_r($output);
Output for rfc.property-hooks, git.master_jit, git.master
Array ( [1] => stdClass Object ( [item] => apple [picture] => asdkls.jpg ) [2] => stdClass Object ( [item] => orange [picture] => sda.jpg,sf.jpg,ffd.jpg ) )

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:
39.67 ms | 1007 KiB | 4 Q