title: Class to check empty inputs validation with php OOP
body: <p>I dont understand why this is not working and any advice for oop im beginner on oop paradigm</p>
  
  <p><strong>My class</strong> </p>
  
  <pre><code>class formvalidation  {
  
       public function check_empty_input($inputs=[]){
           $checked = false;
  
           foreach($inputs as $valor){
               if(empty($valor)){
                   $checked = false;
                   break;  
               } else {
                   $checked = true;
               }
           }
  
           if($checked = true){return true;}
           else {return false;}
       }
  
  }
  </code></pre>
  
  <p><strong>Check if posts are empty</strong></p>
  
  <pre><code>  $formvalidation= new formvalidation();
  
    $inputs = array($_POST['name'],$_POST['email'],$_POST['pass'],$_POST['confirmpass']);
    if($formvalidation-&gt;check_empty_input($inputs)) 
  </code></pre>