30秒学会 PHP 片段 – isUpperCase
Returns true if the given string is upper case, false otherwise. Convert the given string to upper c...
Returns true if the given string is upper case, false otherwise. Convert the given string to upper c...
Returns an array with $n elements removed from the beginning. Use array_slice() to remove $n items f...
Checks a flat list for duplicate values, returning true if duplicate values exists and false if valu...
Return a new function that composes multiple functions into a single callable. Use array_reduce() to...
Checks if the provided integer is a prime number. Check numbers from 2 to the square root of the giv...
Calculates the factorial of a number. Use recursion. If $n is less then or equal to 1, return 1. Oth...
Returns all elements in an array except for the first one. Use array_slice() and count() to return a...
Filters the collection using the given callback. Use array_values(), array_diff() and array_filter()...
Returns the average of two or more numbers. Use array_sum() for all the values in $items and return ...
Returns true if the given string is a palindrome, false otherwise. Check if the value of strrev($str...