]> granicus.if.org Git - php/commitdiff
- Deprecate ticks
authorFelipe Pena <felipe@php.net>
Thu, 17 Jul 2008 19:29:34 +0000 (19:29 +0000)
committerFelipe Pena <felipe@php.net>
Thu, 17 Jul 2008 19:29:34 +0000 (19:29 +0000)
Zend/tests/bug43027.phpt
Zend/tests/jump12.phpt
Zend/zend_compile.c
ext/standard/basic_functions.c
ext/standard/tests/general_functions/bug41037.phpt
ext/standard/tests/general_functions/closures_002.phpt

index 2cf2d1d6a556455a17a0c00e0e574f1fb6b1ed59..32f68d0bdd83082b44a1a5ba8f80a9a1d44e9b16 100755 (executable)
@@ -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
index 3c244d6181995ee84f46804b2ba78733afa9225f..a7fa590f06be9c0a6581df18f8ce8e8bfdbf18d2 100644 (file)
@@ -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!
index 7a8a2c3af444b12a91c17965bce3b15444464f8b..f70913254403edd9ac57a549da1372829c63cea9 100644 (file)
@@ -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;
index afa41e72096318a0afd295d5a5f51f99c09905ff..9a0d11022f6036a5da339066ae40be0a9ca88834 100644 (file)
@@ -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);
 
index eab2c334c944170b58efe5b9c55a2451d0998ec7..a75cb8c4da86f6f5249c9688e21f5d46f61cb7e8 100644 (file)
@@ -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
index 6df389bbb11ce852ac4c1d1b712c70d71ba2f92b..35eb7ed54c90849c6ea986d6235d22e6c0e4df7e 100755 (executable)
@@ -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