]> granicus.if.org Git - php/commitdiff
Added comments about special functions
authorDmitry Stogov <dmitry@zend.com>
Fri, 19 Feb 2016 12:44:11 +0000 (15:44 +0300)
committerDmitry Stogov <dmitry@zend.com>
Fri, 19 Feb 2016 12:44:11 +0000 (15:44 +0300)
ext/standard/string.c

index 3ac3614ac9a0aea0c71f556edaff568b2084f8c3..82aa97e8cd2696df1f154e8f32e4e7392a13b591 100644 (file)
@@ -2740,7 +2740,8 @@ PHP_FUNCTION(quotemeta)
 /* }}} */
 
 /* {{{ proto int ord(string character)
-   Returns ASCII value of character */
+   Returns ASCII value of character
+   Warning: This function is special-cased by zend_compile.c and so is bypassed for constant string argument */
 PHP_FUNCTION(ord)
 {
        char   *str;
@@ -2761,7 +2762,8 @@ PHP_FUNCTION(ord)
 /* }}} */
 
 /* {{{ proto string chr(int ascii)
-   Converts ASCII code to a character */
+   Converts ASCII code to a character
+   Warning: This function is special-cased by zend_compile.c and so is bypassed for constant integer argument */
 PHP_FUNCTION(chr)
 {
        zend_long c;