mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
- Deprecate ticks
This commit is contained in:
parent
10e7231f2a
commit
c3453925c5
@ -6,5 +6,6 @@ declare(ticks=1);
|
||||
namespace test;
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
|
||||
ok
|
||||
|
@ -13,7 +13,8 @@ c:
|
||||
print "ok!\n";
|
||||
goto b;
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
|
||||
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)) {
|
||||
convert_to_long(&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
|
||||
} 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;
|
||||
|
@ -6031,6 +6031,8 @@ PHP_FUNCTION(register_tick_function)
|
||||
if (tick_fe.arg_count < 1) {
|
||||
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);
|
||||
|
||||
|
@ -14,6 +14,9 @@ register_tick_function('a');
|
||||
echo "Done\n";
|
||||
?>
|
||||
--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
|
||||
Warning: unregister_tick_function(): Unable to delete tick function executed at the moment in %s on line %d
|
||||
Done
|
||||
|
@ -17,6 +17,9 @@ echo "Done\n";
|
||||
|
||||
?>
|
||||
--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
|
||||
%d
|
||||
%d
|
||||
|
Loading…
Reference in New Issue
Block a user