mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
- Deprecate ticks
This commit is contained in:
parent
10e7231f2a
commit
c3453925c5
6 changed files with 14 additions and 2 deletions
|
@ -6,5 +6,6 @@ declare(ticks=1);
|
||||||
namespace test;
|
namespace test;
|
||||||
echo "ok\n";
|
echo "ok\n";
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECTF--
|
||||||
|
Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
|
||||||
ok
|
ok
|
||||||
|
|
|
@ -13,7 +13,8 @@ c:
|
||||||
print "ok!\n";
|
print "ok!\n";
|
||||||
goto b;
|
goto b;
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECTF--
|
||||||
|
Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
|
||||||
ok!
|
ok!
|
||||||
ok!
|
ok!
|
||||||
ok!
|
ok!
|
||||||
|
|
|
@ -4592,6 +4592,8 @@ void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC)
|
||||||
if (!zend_binary_strcasecmp(var->u.constant.value.str.val, var->u.constant.value.str.len, "ticks", sizeof("ticks")-1)) {
|
if (!zend_binary_strcasecmp(var->u.constant.value.str.val, var->u.constant.value.str.len, "ticks", sizeof("ticks")-1)) {
|
||||||
convert_to_long(&val->u.constant);
|
convert_to_long(&val->u.constant);
|
||||||
CG(declarables).ticks = val->u.constant;
|
CG(declarables).ticks = val->u.constant;
|
||||||
|
|
||||||
|
zend_error(E_DEPRECATED, "Ticks is deprecated and will be removed in PHP 6");
|
||||||
#ifdef ZEND_MULTIBYTE
|
#ifdef ZEND_MULTIBYTE
|
||||||
} else if (!zend_binary_strcasecmp(var->u.constant.value.str.val, var->u.constant.value.str.len, "encoding", sizeof("encoding")-1)) {
|
} else if (!zend_binary_strcasecmp(var->u.constant.value.str.val, var->u.constant.value.str.len, "encoding", sizeof("encoding")-1)) {
|
||||||
zend_encoding *new_encoding, *old_encoding;
|
zend_encoding *new_encoding, *old_encoding;
|
||||||
|
|
|
@ -6032,6 +6032,8 @@ PHP_FUNCTION(register_tick_function)
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "Ticks is deprecated and will be removed in PHP 6");
|
||||||
|
|
||||||
tick_fe.arguments = (zval **) safe_emalloc(sizeof(zval *), tick_fe.arg_count, 0);
|
tick_fe.arguments = (zval **) safe_emalloc(sizeof(zval *), tick_fe.arg_count, 0);
|
||||||
|
|
||||||
if (zend_get_parameters_array(ht, tick_fe.arg_count, tick_fe.arguments) == FAILURE) {
|
if (zend_get_parameters_array(ht, tick_fe.arg_count, tick_fe.arguments) == FAILURE) {
|
||||||
|
|
|
@ -14,6 +14,9 @@ register_tick_function('a');
|
||||||
echo "Done\n";
|
echo "Done\n";
|
||||||
?>
|
?>
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
|
Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
|
||||||
|
|
||||||
|
Deprecated: register_tick_function(): Ticks is deprecated and will be removed in PHP 6 in %s on line %d
|
||||||
hello
|
hello
|
||||||
Warning: unregister_tick_function(): Unable to delete tick function executed at the moment in %s on line %d
|
Warning: unregister_tick_function(): Unable to delete tick function executed at the moment in %s on line %d
|
||||||
Done
|
Done
|
||||||
|
|
|
@ -17,6 +17,9 @@ echo "Done\n";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
|
Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
|
||||||
|
|
||||||
|
Deprecated: register_tick_function(): Ticks is deprecated and will be removed in PHP 6 in %s on line %d
|
||||||
Test
|
Test
|
||||||
%d
|
%d
|
||||||
%d
|
%d
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue