Pass each value to callback function and remove that element from the array if callback returns true.

array:remove_value_if(ARRAY $array, FUNCTION $callback) : ARRAY

array:remove_value_if(["User",2,"Name"],type:string?)
#=> [ 1 => 2 ]

array:remove_value_if([1,2,3,4], function($number){ return $number > 2; })
#=> [ 1, 2 ]

array:remove_value_if([],type:string?)
#=> []

Copyright ©2013-2022 SunSed®. All rights reserved.