1--TEST-- 2PDO_Firebird: support EXECUTE BLOCK 3--EXTENSIONS-- 4pdo_firebird 5--SKIPIF-- 6<?php require('skipif.inc'); 7?> 8--ENV-- 9LSAN_OPTIONS=detect_leaks=0 10--FILE-- 11<?php 12 require("testdb.inc"); 13 14 $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); 15 16 $sql = ' 17execute block (a int = :e, b int = :d) 18returns (N int, M int) 19as 20declare z int; 21begin 22 select 10 23 from rdb$database 24 into :z; 25 26 n = a + b + z; 27 m = z * a; 28 suspend; 29end 30'; 31 $query = $dbh->prepare($sql); 32 $query->execute(['d' => 1, 'e' => 2]); 33 $row = $query->fetch(\PDO::FETCH_OBJ); 34 var_dump($row->N); 35 var_dump($row->M); 36 37 unset($query); 38 unset($dbh); 39 echo "done\n"; 40 41?> 42--EXPECT-- 43int(13) 44int(20) 45done 46