$array = array('name' => 'John', 'age' => 32, 'contact' => array('email' => 'john@example.com', 'phone' => '1234567890')); $flattenedArray = cu_array_flatten($array);
array('name' => 'John', 'age' => 32, 'contact.email' => 'john@example.com', 'contact.phone' => '1234567890')
$string = 'The quick brown fox jumps over the lazy dog'; $pattern = '/quick (\w+) fox/'; $matches = cu_regex_match($pattern, $string);
array('quick brown fox', 'brown')
$date1 = new DateTime('2021-01-01'); $date2 = new DateTime('2022-06-01'); $diff = cu_date_diff($date1, $date2);
array('years' => 1, 'months' => 5, 'days' => 0)PHP CUtil library is a package library that can be installed via Composer. Its package name is `devedge/cutil`.