1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_002.phpt
2025-09-03 08:42:33 +02:00

23 lines
627 B
PHP

--TEST--
PDO_sqlite: Testing sqliteCreateFunction() produces warning when
un-callable function passed
--CREDITS--
Chris MacPherson chris@kombine.co.uk
--EXTENSIONS--
pdo_sqlite
--FILE--
<?php
$db = new PDO( 'sqlite::memory:');
try {
$db->sqliteCreateFunction('bar-alias', 'bar');
} catch (\TypeError $e) {
echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECTF--
Deprecated: Method PDO::sqliteCreateFunction() is deprecated since 8.5, use Pdo\Sqlite::createFunction() instead in %s on line %d
PDO::sqliteCreateFunction(): Argument #2 ($callback) must be a valid callback, function "bar" not found or invalid function name