title: PHP + PostGresql + stored procedure
body: <p>I have the next procedure in postgresql</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION suma (INTEGER,INTEGER) RETURNS INTEGER AS $$
  DECLARE
      RES INTEGER;
  BEGIN   
      RES := $1 + $2;
      RETURN RES;
  END;
  $$ LANGUAGE PLPGSQL;
  </code></pre>
  
  <p>I want to call in php and show value of the procedure in this case RES, i have this in php but i dont know hot to get that value</p>
  
  <pre><code>$db = new PDO("pgsql:dbname=test003;host=localhost", "postgres", "root" );
  
      $sql = 'CALL suma(?, ?)';
      $stmt = $db-&gt;prepare($sql);
  
      $x = 1;
      $y = 2;
  
      $stmt-&gt;bindValue(1, $x, PDO::PARAM_INT);
      $stmt-&gt;bindValue(2, $y, PDO::PARAM_INT);
      $stmt-&gt;execute();
  
      echo "PDO connection object created ". $x . " " . $y; 
  </code></pre>