3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'ticket_number' => 'sdfsdfsdf 2', 'strategy_id' => '5', 'journal_entries_strategy_conditions' => [ 0 => [ 'strategies_condition_id' => '' ], 1 => [ 'strategies_condition_id' => '1' ] ], 'timeframe' => '', ]; $array['journal_entries_strategy_conditions'] = array_filter( $array['journal_entries_strategy_conditions'], fn($v) => $v['strategies_condition_id'] ); var_export($array);
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
array ( 'ticket_number' => 'sdfsdfsdf 2', 'strategy_id' => '5', 'journal_entries_strategy_conditions' => array ( 1 => array ( 'strategies_condition_id' => '1', ), ), 'timeframe' => '', )

preferences:
71.51 ms | 407 KiB | 5 Q