mirror of
https://github.com/php/php-src.git
synced 2026-04-13 02:52:48 +02:00
The extension name should match the name of the ext/ directory, otherwise it will not get picked up by run-tests. It would be possible to remap this in run-tests, but I think it's better to rename the extension to follow the standard format. Other extensions also use underscore instead of hyphen (e.g. pdo_mysql and not pdo-mysql). Of course, the ./configure option remains hyphenated. Closes GH-6613.
47 lines
964 B
PHP
47 lines
964 B
PHP
--TEST--
|
|
Check that arguments are freed when calling a deprecated function
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('zend_test')) die('skip zend_test extension not loaded');
|
|
--FILE--
|
|
<?php
|
|
|
|
set_error_handler(function($code, $msg) {
|
|
throw new Error($msg);
|
|
});
|
|
|
|
try {
|
|
zend_test_deprecated(new stdClass);
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
$ret = new stdClass;
|
|
try {
|
|
$ret = zend_test_deprecated(new stdClass());
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
try {
|
|
$fn = 'zend_test_deprecated';
|
|
$fn(new stdClass);
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
$ret = new stdClass;
|
|
try {
|
|
$fn = 'zend_test_deprecated';
|
|
$ret = $fn(new stdClass);
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Function zend_test_deprecated() is deprecated
|
|
Function zend_test_deprecated() is deprecated
|
|
Function zend_test_deprecated() is deprecated
|
|
Function zend_test_deprecated() is deprecated
|