mirror of
https://github.com/php/php-src.git
synced 2026-03-26 01:02:25 +01:00
Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to report FAILURE errors using a TypeException instead of a Warning, like it would happen in strict mode. Adds a zend_parse_parameters_throw() convenience function, which invokes zpp with this flag. Converts all cases I could identify, where we currently have throwing zpp usage in constructors and replaces them with this API. Error handling is still replaced to EH_THROW in some cases to handle other, domain-specific errors in constructors.
20 lines
394 B
PHP
20 lines
394 B
PHP
--TEST--
|
|
SQLite3::open test, testing for function parameters
|
|
--CREDITS--
|
|
Felix De Vliegher
|
|
# Belgian PHP Testfest 2009
|
|
--SKIPIF--
|
|
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
try {
|
|
$db = new SQLite3();
|
|
} catch (TypeException $e) {
|
|
var_dump($e->getMessage());
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
%string|unicode%(60) "SQLite3::__construct() expects at least 1 parameter, 0 given"
|