[PHP-DOC] cvs: phpdoc /en/reference/gettext/functions -.xml
derick Fri Jan 9 03:42:50 2004 EDT Removed files: /phpdoc/en/reference/gettext/functions -.xml Log: - Remove unwanted alias
[PHP-DOC] #26821 [Opn-Bgs]: if(NANC 0) - always evaluates TRUE
ID: 26821 Updated by: [EMAIL PROTECTED] Reported By: ivo at benetech dot org -Status: Open +Status: Bogus Bug Type: Documentation problem Operating System: Linux / RH 7.3 PHP Version: 4.3.4 New Comment: Who wants to evaluate NANC 0??? It _absolutely_ makes no sense. If someone asks you if A+B 4 is, you wouldn't know what to calculate... FYI I've tried ivo's script. Under PHP 4.3.3 it produces should happen...but doesnt and under 4.3.0 it's should not happen...but does. Previous Comments: [2004-01-08 22:35:09] skissane at ics dot mq dot edu dot au Vrana: your comment makes no sense. If NANC is converted to 0, then 0 0 would be FALSE, not true. Compare these expressions: NANC 0result TRUE NANC 0 result FALSE 0 0 result FALSE So it seems it is neither converting NANC to an integer 0, nor 0 to a string 0. What actually is going on? The documentation should clarify this. [2004-01-07 13:20:58] ivo at benetech dot org It also print 0 as expected. if( (int) NANC 0) also evaluates as expected. [2004-01-07 05:53:18] [EMAIL PROTECTED] NANC is converted to 0 for comparison. It works for me as expected. What is printed by the code ?php echo intval(NANC); ? on your system? [2004-01-06 18:08:12] ivo at benetech dot org Documentation needs to be more explicit about php being strongly typed. http://www.php.net/manual/en/language.types.type-juggling.php or http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion [2004-01-06 17:23:58] [EMAIL PROTECTED] RTFM: http://www.php.net/manual/en/types.comparisons.php (never ever compare different types like that) The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/26821 -- Edit this bug report at http://bugs.php.net/?id=26821edit=1
[PHP-DOC] cvs: phpdoc / funclist.txt /scripts genfunclist.sh
nlopess Fri Jan 9 11:27:08 2004 EDT Modified files: /phpdoc funclist.txt /phpdoc/scripts genfunclist.sh Log: s/php4/php-src/ Index: phpdoc/funclist.txt diff -u phpdoc/funclist.txt:1.29 phpdoc/funclist.txt:1.30 --- phpdoc/funclist.txt:1.29Sat Jan 3 07:39:11 2004 +++ phpdoc/funclist.txt Fri Jan 9 11:27:08 2004 @@ -1,7 +1,7 @@ -# php4/ZendEngine2/zend_API.c +# php-src/ZendEngine2/zend_API.c display_disabled_function -# php4/ZendEngine2/zend_builtin_functions.c +# php-src/ZendEngine2/zend_builtin_functions.c class_exists crash create_function @@ -49,9 +49,9 @@ zend_test_func zend_thread_id zend_version -# php4/ZendEngine2/zend_default_classes.c -# php4/ZendEngine2/zend_interfaces.c -# php4/ZendEngine2/zend_reflection_api.c +# php-src/ZendEngine2/zend_default_classes.c +# php-src/ZendEngine2/zend_interfaces.c +# php-src/ZendEngine2/zend_reflection_api.c @@ -66,7 +66,7 @@ export -# php4/ext/bcmath/bcmath.c +# php-src/ext/bcmath/bcmath.c bcadd bccomp bcdiv @@ -77,7 +77,7 @@ bcscale bcsqrt bcsub -# php4/ext/bz2/bz2.c +# php-src/ext/bz2/bz2.c bzclose bzcompress bzdecompress @@ -88,7 +88,7 @@ bzopen bzread bzwrite -# php4/ext/calendar/calendar.c +# php-src/ext/calendar/calendar.c cal_days_in_month cal_from_jd cal_info @@ -107,8 +107,12 @@ jewishtojd juliantojd unixtojd -# php4/ext/com_dotnet/com_extension.c +# php-src/ext/com_dotnet/com_extension.c com_create_guid +com_event_sink +com_load_typelib +com_message_pump +com_print_typeinfo variant_abs variant_add variant_and @@ -135,7 +139,7 @@ variant_set_type variant_sub variant_xor -# php4/ext/cpdf/cpdf.c +# php-src/ext/cpdf/cpdf.c cpdf_add_annotation cpdf_add_outline cpdf_arc @@ -208,7 +212,7 @@ cpdf_stroke cpdf_text cpdf_translate -# php4/ext/ctype/ctype.c +# php-src/ext/ctype/ctype.c ctype_alnum ctype_alpha ctype_cntrl @@ -220,7 +224,7 @@ ctype_space ctype_upper ctype_xdigit -# php4/ext/curl/interface.c +# php-src/ext/curl/interface.c curl_close curl_errno curl_error @@ -237,7 +241,7 @@ curl_multi_select curl_setopt curl_version -# php4/ext/dba/dba.c +# php-src/ext/dba/dba.c dba_close dba_delete dba_exists @@ -253,7 +257,7 @@ dba_popen dba_replace dba_sync -# php4/ext/dbase/dbase.c +# php-src/ext/dbase/dbase.c dbase_add_record dbase_close dbase_create @@ -266,7 +270,7 @@ dbase_open dbase_pack dbase_replace_record -# php4/ext/dbx/dbx.c +# php-src/ext/dbx/dbx.c dbx_close dbx_compare dbx_connect @@ -275,7 +279,7 @@ dbx_fetch_row dbx_query dbx_sort -# php4/ext/dio/dio.c +# php-src/ext/dio/dio.c dio_close dio_fcntl dio_open @@ -285,45 +289,45 @@ dio_tcsetattr dio_truncate dio_write -# php4/ext/dom/attr.c -# php4/ext/dom/cdatasection.c -# php4/ext/dom/characterdata.c -# php4/ext/dom/comment.c -# php4/ext/dom/document.c -# php4/ext/dom/documentfragment.c -# php4/ext/dom/documenttype.c -# php4/ext/dom/domconfiguration.c -# php4/ext/dom/domerror.c -# php4/ext/dom/domerrorhandler.c -# php4/ext/dom/domexception.c -# php4/ext/dom/domimplementation.c -# php4/ext/dom/domimplementationlist.c -# php4/ext/dom/domimplementationsource.c -# php4/ext/dom/domlocator.c -# php4/ext/dom/domstringlist.c -# php4/ext/dom/element.c -# php4/ext/dom/entity.c -# php4/ext/dom/entityreference.c -# php4/ext/dom/namednodemap.c -# php4/ext/dom/namelist.c -# php4/ext/dom/node.c -# php4/ext/dom/nodelist.c -# php4/ext/dom/notation.c -# php4/ext/dom/php_dom.c +# php-src/ext/dom/attr.c +# php-src/ext/dom/cdatasection.c +# php-src/ext/dom/characterdata.c +# php-src/ext/dom/comment.c +# php-src/ext/dom/document.c +# php-src/ext/dom/documentfragment.c +# php-src/ext/dom/documenttype.c +# php-src/ext/dom/domconfiguration.c +# php-src/ext/dom/domerror.c +# php-src/ext/dom/domerrorhandler.c +# php-src/ext/dom/domexception.c +# php-src/ext/dom/domimplementation.c +# php-src/ext/dom/domimplementationlist.c +# php-src/ext/dom/domimplementationsource.c +# php-src/ext/dom/domlocator.c +# php-src/ext/dom/domstringlist.c +# php-src/ext/dom/element.c +# php-src/ext/dom/entity.c +# php-src/ext/dom/entityreference.c +# php-src/ext/dom/namednodemap.c +# php-src/ext/dom/namelist.c +# php-src/ext/dom/node.c +# php-src/ext/dom/nodelist.c +# php-src/ext/dom/notation.c +# php-src/ext/dom/php_dom.c dom_import_simplexml -# php4/ext/dom/processinginstruction.c -# php4/ext/dom/string_extend.c -# php4/ext/dom/text.c -# php4/ext/dom/typeinfo.c -# php4/ext/dom/userdatahandler.c -# php4/ext/dom/xpath.c -# php4/ext/exif/exif.c +# php-src/ext/dom/processinginstruction.c +# php-src/ext/dom/string_extend.c +# php-src/ext/dom/text.c +# php-src/ext/dom/typeinfo.c +# php-src/ext/dom/userdatahandler.c +# php-src/ext/dom/xpath.c +# php-src/ext/exif/exif.c exif_imagetype exif_read_data exif_tagname exif_thumbnail read_exif_data -# php4/ext/fam/fam.c +# php-src/ext/fam/fam.c fam_cancel_monitor fam_close fam_monitor_collection @@ -334,7 +338,7 @@ fam_pending fam_resume_monitor
[PHP-DOC] #26821 [Bgs]: if(NANC 0) - always evaluates TRUE
ID: 26821 User updated by: ivo at benetech dot org Reported By: ivo at benetech dot org Status: Bogus Bug Type: Documentation problem Operating System: Linux / RH 7.3 PHP Version: 4.3.4 New Comment: If someone asks you if A+B 4 is, you wouldn't know what to calculate... I sincerely hope this would hold: http://www.php.net/manual/en/language.operators.php#language.operators.precedence otherwise theres bigger problems. If a statement such as some arbitrary string 0 is not to be trusted then the documentation should be updated to reflect this. Currently it explains strong comparisons with '===', weak with '==' but it does not mention or , ony obliquely and it obviously does not. (http://www.php.net/manual/en/types.comparisons.php) p.s. I am working with a site that manipulates strings everywhere. most functions return 0 on error or the processed string if all goes well. just finished updting it to return ints always use references for strings. still think it's an outright bug or at least a documentation problem due to all the 'weak' type comparison references examples everywhere. Previous Comments: [2004-01-09 11:04:29] [EMAIL PROTECTED] Who wants to evaluate NANC 0??? It _absolutely_ makes no sense. If someone asks you if A+B 4 is, you wouldn't know what to calculate... FYI I've tried ivo's script. Under PHP 4.3.3 it produces should happen...but doesnt and under 4.3.0 it's should not happen...but does. [2004-01-08 22:35:09] skissane at ics dot mq dot edu dot au Vrana: your comment makes no sense. If NANC is converted to 0, then 0 0 would be FALSE, not true. Compare these expressions: NANC 0result TRUE NANC 0 result FALSE 0 0 result FALSE So it seems it is neither converting NANC to an integer 0, nor 0 to a string 0. What actually is going on? The documentation should clarify this. [2004-01-07 13:20:58] ivo at benetech dot org It also print 0 as expected. if( (int) NANC 0) also evaluates as expected. [2004-01-07 05:53:18] [EMAIL PROTECTED] NANC is converted to 0 for comparison. It works for me as expected. What is printed by the code ?php echo intval(NANC); ? on your system? [2004-01-06 18:08:12] ivo at benetech dot org Documentation needs to be more explicit about php being strongly typed. http://www.php.net/manual/en/language.types.type-juggling.php or http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/26821 -- Edit this bug report at http://bugs.php.net/?id=26821edit=1
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions file.xml
vrana Fri Jan 9 11:54:16 2004 EDT Modified files: /phpdoc/en/reference/filesystem/functions file.xml Log: Dot Index: phpdoc/en/reference/filesystem/functions/file.xml diff -u phpdoc/en/reference/filesystem/functions/file.xml:1.13 phpdoc/en/reference/filesystem/functions/file.xml:1.14 --- phpdoc/en/reference/filesystem/functions/file.xml:1.13 Sat Dec 20 20:05:38 2003 +++ phpdoc/en/reference/filesystem/functions/file.xml Fri Jan 9 11:54:16 2004 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.13 $ -- +!-- $Revision: 1.14 $ -- !-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -- refentry id=function.file refnamediv @@ -67,7 +67,7 @@ /note note simpara - Context support was added with literalPHP 5.0.0/literal + Context support was added with literalPHP 5.0.0/literal. /simpara /note para
[PHP-DOC] Putting an FAQ in my PHP Book
To whom it may concern:My name is Matt Rutledge and I am currently writing a PHP book and Iwant to put the Build Problems FAQ section in one of my Appendices in mybook. I wanted to get permission before we published. Is it ok toreprint this section in my book? Thanks, Matt Rutledge www.datausa.com 303.708.9708
[PHP-DOC] #26821 [Bgs]: if(NANC 0) - always evaluates TRUE
ID: 26821 Updated by: [EMAIL PROTECTED] Reported By: ivo at benetech dot org Status: Bogus Bug Type: Documentation problem Operating System: Linux / RH 7.3 PHP Version: 4.3.4 New Comment: As said by sniper: never ever compare different types like that!!! In case $var is an int, you can do a $var 0. In case $var is a string, PHP don't know what to do (try this with Java or C++!). Let your called functions return FALSE on error and everything works fine. Or as an alternative, try something like $var=somefunction(); if(is_integer($var)$var0) { // Here comes the error-Processing print(Error\n); } else { // Do something with $var print $var; } Previous Comments: [2004-01-09 11:32:01] ivo at benetech dot org If someone asks you if A+B 4 is, you wouldn't know what to calculate... I sincerely hope this would hold: http://www.php.net/manual/en/language.operators.php#language.operators.precedence otherwise theres bigger problems. If a statement such as some arbitrary string 0 is not to be trusted then the documentation should be updated to reflect this. Currently it explains strong comparisons with '===', weak with '==' but it does not mention or , ony obliquely and it obviously does not. (http://www.php.net/manual/en/types.comparisons.php) p.s. I am working with a site that manipulates strings everywhere. most functions return 0 on error or the processed string if all goes well. just finished updting it to return ints always use references for strings. still think it's an outright bug or at least a documentation problem due to all the 'weak' type comparison references examples everywhere. [2004-01-09 11:04:29] [EMAIL PROTECTED] Who wants to evaluate NANC 0??? It _absolutely_ makes no sense. If someone asks you if A+B 4 is, you wouldn't know what to calculate... FYI I've tried ivo's script. Under PHP 4.3.3 it produces should happen...but doesnt and under 4.3.0 it's should not happen...but does. [2004-01-08 22:35:09] skissane at ics dot mq dot edu dot au Vrana: your comment makes no sense. If NANC is converted to 0, then 0 0 would be FALSE, not true. Compare these expressions: NANC 0result TRUE NANC 0 result FALSE 0 0 result FALSE So it seems it is neither converting NANC to an integer 0, nor 0 to a string 0. What actually is going on? The documentation should clarify this. [2004-01-07 13:20:58] ivo at benetech dot org It also print 0 as expected. if( (int) NANC 0) also evaluates as expected. [2004-01-07 05:53:18] [EMAIL PROTECTED] NANC is converted to 0 for comparison. It works for me as expected. What is printed by the code ?php echo intval(NANC); ? on your system? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/26821 -- Edit this bug report at http://bugs.php.net/?id=26821edit=1
[PHP-DOC] cvs: phpdoc /en/reference/mysql/functions mysql-affected-rows.xml
betzFri Jan 9 18:00:31 2004 EDT Modified files: /phpdoc/en/reference/mysql/functionsmysql-affected-rows.xml Log: changed pconnect to connect Index: phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml diff -u phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml:1.12 phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml:1.13 --- phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml:1.12Mon Jan 5 08:03:26 2004 +++ phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml Fri Jan 9 18:00:31 2004 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.12 $ -- +!-- $Revision: 1.13 $ -- !-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -- refentry id=function.mysql-affected-rows refnamediv @@ -57,7 +57,7 @@ ![CDATA[ ?php /* connect to database */ -mysql_pconnect(localhost, mysql_user, mysql_password) +mysql_connect(localhost, mysql_user, mysql_password) or die(Could not connect: . mysql_error()); mysql_select_db(mydb); @@ -89,7 +89,7 @@ ![CDATA[ ?php /* connect to database */ -mysql_pconnect(localhost, mysql_user, mysql_password) or +mysql_connect(localhost, mysql_user, mysql_password) or die(Could not connect: . mysql_error()); mysql_select_db(mydb);