3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 2400 => [ ['value' => 7, 0 => 7], ['value' => 61, 0 => 61], ['value' => 42, 0 => 42], ['value' => null, 0 => null], ], 2401 => [ ['value' => null, 0 => null], ['value' => 66, 0 => 66], ['value' => null, 0 => null], ['value' => 21, 0 => 21], ] ]; var_export( array_map( fn($row) => array_filter($row, 'array_sum'), $array ) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 2400 => array ( 0 => array ( 'value' => 7, 0 => 7, ), 1 => array ( 'value' => 61, 0 => 61, ), 2 => array ( 'value' => 42, 0 => 42, ), ), 2401 => array ( 1 => array ( 'value' => 66, 0 => 66, ), 3 => array ( 'value' => 21, 0 => 21, ), ), )

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:
102.96 ms | 406 KiB | 5 Q