Ticket #55257: #55257.patch
File #55257.patch, 563 bytes (added by , 2 years ago) |
---|
-
formatting.php
5000 5000 * @return mixed The value with the callback applied to all non-arrays and non-objects inside it. 5001 5001 */ 5002 5002 function map_deep( $value, $callback ) { 5003 if ( is_object( $value ) && $value instanceof __PHP_Incomplete_Class ) { 5004 return $value; 5005 } 5006 5003 5007 if ( is_array( $value ) ) { 5004 5008 foreach ( $value as $index => $item ) { 5005 5009 $value[ $index ] = map_deep( $item, $callback );