Advertisement
Guest User

Untitled

a guest
Sep 5th, 2015
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1.     public function __construct(array $inputs) {
  2.        
  3.         $this->arrayData = $inputs;
  4.        
  5.         foreach ($inputs as $number) {
  6.             $inputs = $number; 
  7.            
  8.         if (is_numeric($number) === FALSE) {
  9.            
  10.             throw new Exception("Input array is not numeric");
  11.         }
  12.  
  13.         if ($inputs < $number) {
  14.            
  15.             throw new Exception("Input array is less than zero");
  16.         }
  17.         $this->arrayData = $inputs;
  18.     }
  19.        
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement