title: PHP: Error when call function from another function 500 internal server error
body: <p>i don't find error when call a function from another function like this:</p>
  
  <p><strong>FUNCTIONS PHP</strong></p>
  
  <p>
  
  <pre><code>class DB_Functions extends DB_Connect{
  
      private $dbConnect = "";
  
      public function __construct() {
          $this-&gt;dbConnect = $this-&gt;pdo_connect();
      }
  
      public function __destruct() {
          $this-&gt;dbConnect = null;
      }
  
      public function actionOnProfile() {
  
          //MORE CODE
          $id = $this-&gt;dataActionProfile['id'];
          $nombre = $this-&gt;dataActionProfile['nombre'];
          $descrip = $this-&gt;dataActionProfile['descrip'];
  
          updateprofile($nombre, $descrip, $id);
      }
  
      function updateprofile($nombre, $descrip, $id) {
          $sql = "UPDATE cat_perfiles SET Nombre = :nom, Descripcion = :des WHERE Id = :id";
  
          $result = $this-&gt;dbConnect-&gt;prepare($sql) or die ($sql);
          $result-&gt;bindParam(':nom',$nombre,PDO::PARAM_STR);
          $result-&gt;bindParam(':des',$descrip,PDO::PARAM_STR);
          $result-&gt;bindParam(':id',$id,PDO::PARAM_INT);
  
          if (!$result-&gt;execute()) {
              return false; 
          }
  
          $jsonErrorProfile = array();
          $jsonErrorProfile['success'] = 'success';
          return $jsonErrorProfile;
      }
  }
  </code></pre>
  
  <p>Error is when use <strong>updateprofile($nombre, $descrip, $id);</strong></p>
  
  <p>Error: <strong>500 Internal Server Error</strong></p>