PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php function check(array $numbers){ if(empty($array)) return false; $first = reset($numbers); if(!is_int($first)) return false; foreach($numbers as $current) { if( $current !== $first) return false; $first++; } return 'Возрастает'; } echo check([4,5,6]);
Show:  
Copy Clear