3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'ticket_number' => 'sdfsdfsdf 2', 'strategy_id' => '5', 'journal_entries_strategy_conditions' => [ 0 => [ 'strategies_condition_id' => '' ], 1 => [ 'strategies_condition_id' => '1' ] ], 'timeframe' => '', ]; $filtered = array_filter(array_column($arr['journal_entries_strategy_conditions'], 'strategies_condition_id')); $arr['journal_entries_strategy_conditions'] = array_intersect_key($arr['journal_entries_strategy_conditions'], $filtered); var_dump($arr);

preferences:
26.05 ms | 407 KiB | 5 Q