1--TEST-- 2dba_fetch() legacy signature 3--EXTENSIONS-- 4dba 5--SKIPIF-- 6<?php 7require_once __DIR__ . '/setup/setup_dba_tests.inc'; 8check_skip_any(); 9?> 10--FILE-- 11<?php 12require_once __DIR__ . '/setup/setup_dba_tests.inc'; 13$name = 'legacy_fetch_signature.db'; 14 15$db = get_any_db($name); 16 17dba_insert("key1", "This is a test insert", $db); 18echo dba_fetch("key1", 0, $db), \PHP_EOL, dba_fetch("key1", $db, 0), \PHP_EOL; 19 20set_error_handler(function ($severity, $message, $file, $line) { 21 throw new Exception($message); 22}); 23 24try { 25 dba_fetch("key1", 0, $db); 26} catch (Exception $e) { 27 echo $e->getMessage() . "\n"; 28} 29dba_close($db); 30 31?> 32--CLEAN-- 33<?php 34require_once __DIR__ . '/setup/setup_dba_tests.inc'; 35$db_name = 'legacy_fetch_signature.db'; 36cleanup_standard_db($db_name); 37?> 38--EXPECTF-- 39Using handler: "%s" 40 41Deprecated: Calling dba_fetch() with $dba at the 3rd parameter is deprecated in %s on line %d 42This is a test insert 43This is a test insert 44Calling dba_fetch() with $dba at the 3rd parameter is deprecated 45