[PHP-DOC] Typo found!
First off, I wish to extend my thanks to you guys for the great efforts that you put forth. Your time and energy have served me greatly. I beleive I have spotted two typos so I thought I would let you know. 1. http://www.php.net/manual/en/language.oop5.visibility.php Bottom of the page: "Note: The use PHP 4 use of declaring ..." I beleive that's an extra use .. or the whole thing could be ... "The PHP 4 practice of declaring ..." 2. http://www.php.net/manual/en/language.oop5.basic.php I have the feeling that the term overriding is meant and not overloading. "The inherited methods and members can be overloaded, unless the parent class has defined a method as final, by redeclaring them within the same name defined in the parent class. It is possible to access the overloaded method or members by referencing them with parent::"
[PHP-DOC] Re: [PATCH] preg_match and preg_match_all
On Tuesday 12 October 2004 21:08, Mehdi Achour wrote: > Hi Andrey, > > The texts are okay, you'll find some comments on the structure : > [...] Fixed as per your comments. Thank you for reviewing the patch Andrey
[PHP-DOC] cvs: phpdoc /en/reference/pcre/functions preg-match-all.xml preg-match.xml
blindmanTue Oct 12 07:20:31 2004 EDT Modified files: /phpdoc/en/reference/pcre/functions preg-match-all.xml preg-match.xml Log: => use &example.outputs; http://cvs.php.net/diff.php/phpdoc/en/reference/pcre/functions/preg-match-all.xml?r1=1.15&r2=1.16&ty=u Index: phpdoc/en/reference/pcre/functions/preg-match-all.xml diff -u phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.15 phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.16 --- phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.15 Tue Oct 12 03:49:05 2004 +++ phpdoc/en/reference/pcre/functions/preg-match-all.xml Tue Oct 12 07:20:28 2004 @@ -1,5 +1,5 @@ - + @@ -139,7 +139,7 @@ Using offset is not equivalent to - passing substr($subject, $offset) to + passing substr($subject, $offset) to preg_match in place of the subject string, because pattern can contain assertions such as ^, $ or http://cvs.php.net/diff.php/phpdoc/en/reference/pcre/functions/preg-match.xml?r1=1.16&r2=1.17&ty=u Index: phpdoc/en/reference/pcre/functions/preg-match.xml diff -u phpdoc/en/reference/pcre/functions/preg-match.xml:1.16 phpdoc/en/reference/pcre/functions/preg-match.xml:1.17 --- phpdoc/en/reference/pcre/functions/preg-match.xml:1.16 Tue Oct 12 03:49:06 2004 +++ phpdoc/en/reference/pcre/functions/preg-match.xml Tue Oct 12 07:20:28 2004 @@ -1,5 +1,5 @@ - + @@ -58,7 +58,7 @@ Using offset is not equivalent to - passing substr($subject, $offset) to + passing substr($subject, $offset) to preg_match in place of the subject string, because pattern can contain assertions such as ^, $ or @@ -75,9 +75,7 @@ ?> ]]> - - will produce - + &example.outputs; - and + while this example
[PHP-DOC] Re: [PATCH] preg_match and preg_match_all
Hi Andrey, The texts are okay, you'll find some comments on the structure : Andrey Demenev wrote: Index: preg-match-all.xml === + + + Using offset is not equivalent to + passing substr($subject, $offset) to This will be rendered as : passing substr()($subject, $offset) and I don't think it's what you want. You may try something like substr($subject, $offset). This also apply to the other page. + preg_match_all in place of the subject string, + because pattern can contain assertions such as + ^, $ or + (?<=x). See preg_match for + examples. + + Index: preg-match.xml === + + + + + + will produce + We introduced an entity for this kind of stuff : &example.outputs; You should use it like this : &example.outputs; + + + + + and "While this example" + + + + + + will produce Don't use &example.outputs; here, your suggestion is okay for the second example. Thank you a lot for your patch, didou
[PHP-DOC] cvs: phpdoc /en/features file-upload.xml
aidan Tue Oct 12 04:45:27 2004 EDT Modified files: /phpdoc/en/features file-upload.xml Log: Revised http://cvs.php.net/diff.php/phpdoc/en/features/file-upload.xml?r1=1.79&r2=1.80&ty=u Index: phpdoc/en/features/file-upload.xml diff -u phpdoc/en/features/file-upload.xml:1.79 phpdoc/en/features/file-upload.xml:1.80 --- phpdoc/en/features/file-upload.xml:1.79 Fri Sep 10 09:45:23 2004 +++ phpdoc/en/features/file-upload.xml Tue Oct 12 04:45:26 2004 @@ -1,21 +1,23 @@ - + Handling file uploads POST method uploads - + +This feature lets people upload both text and binary files. +With PHP's authentication and file manipulation functions, +you have full control over who is allowed to upload and +what is to be done with the file once it has been uploaded. + PHP is capable of receiving file uploads from any RFC-1867 compliant browser (which includes Netscape Navigator 3 or later, Microsoft Internet Explorer 3 -with a patch from Microsoft, or -later without a patch). This feature lets people upload both text -and binary files. With PHP's authentication and file manipulation -functions, you have full control over who is allowed to upload and -what is to be done with the file once it has been uploaded. +with a patch from Microsoft, or later without a patch). + Related Configurations Note @@ -27,70 +29,70 @@ in &php.ini; + -Note that PHP also supports PUT-method file uploads as used by +PHP also supports PUT-method file uploads as used by Netscape Composer and W3C's Amaya clients. See the PUT Method Support for more details. - -A file upload screen can be built by creating a special form which -looks something like this: - + File Upload Form + + A file upload screen can be built by creating a special form which + looks something like this: + + - - - -The "_URL_" in the above example should be replaced, and point to a PHP -file. The MAX_FILE_SIZE hidden field (measured in bytes) must precede -the file input field, and its value is the maximum filesize accepted. -Also, be sure your file upload form has -enctype="multipart/form-data" otherwise the file -upload will not work. - - The MAX_FILE_SIZE is advisory to the browser, although PHP also checks - it. Changing this on the browser side is quite easy, so you can never - rely on files with a greater size being blocked by this feature. The - PHP-settings for maximum-size, however, cannot be fooled. You should add - the MAX_FILE_SIZE form variable anyway as it saves users the trouble of - waiting for a big file being transferred only to find that it was too - big and the transfer actually failed. + The __URL__ in the above example should be replaced, + and point to a PHP file. - + + The MAX_FILE_SIZE hidden field (measured in bytes) must + precede the file input field, and its value is the maximum filesize accepted. + This is an advisory to the browser, PHP also checks it. + Fooling this setting on the browser side is quite easy, so never rely + on files with a greater size being blocked by this feature. + The PHP settings for maximum-size, however, cannot be fooled. + This form element should always be used as it + saves users the trouble of waiting for a big file being transferred only + to find that it was too big and the transfer failed. + + + Be sure your file upload form has attribute enctype="multipart/form-data" + otherwise the file upload will not work. + + -The Variables defined for uploaded files differs depending on -the PHP version and configuration. The autoglobal -$_FILES -exists as of PHP 4.1.0 The $HTTP_POST_FILES array -has existed since PHP 4.0.0. These arrays will contain all -your uploaded file information. Using $_FILES -is preferred. If the PHP directive -register_globals is -on, related variable names will also exist. -register_globals -defaults to off as of PHP -4.2.0. +The global $_FILES +exists as of PHP 4.1.0 (Use $HTTP_POST_FILES +instead if using an earlier version). +These arrays will contain all the uploaded file information. + The contents of $_FILES -from our example script is as follows. Note that this assumes the use of +from the example form is as follows. Note that this assumes the use of the file upload name userfile, as used in the example -script above. This can be any name. +script above. This can be any name. $_FILES['userfile']['name'] @@ -107,7 +109,7 @@ The mime type of the file, if the browser provided this informati
[PHP-DOC] #30399 [Opn]: "Comparing strings" manual page
ID: 30399 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type:Documentation problem PHP Version: 4.3.9 New Comment: "Is === operator equal to strcmp() if two arguments are strings with numbers in the beginning?" They are equivalent AFAIK. "Many coders use "==" instead of "strcmp" and there should be warning somewhere in manual about possible problems that could arise due to such misuse." There is "If you compare an integer with a string, the string is converted to a number. If you compare two numerical strings, they are compared as integers. These rules also apply to the switch statement." in language.operators.comparison. I think this bug can be marked as bogus. Previous Comments: [2004-10-11 17:40:57] [EMAIL PROTECTED] Description: After studying some string issues I think we need one more page in manual about strings comparison with a link to/from strcmp. Few confusing examples from user-notes on http://www.php.net/manual/en/language.types.string.php And I haven't found any clear answer about is === operator equal to strcmp() if two arguments are strings with numbers in the beginning? Many coders use "==" instead of "strcmp" and there should be warning somewhere in manual about possible problems that could arise due to such misuse. See also: http://bugs.php.net/bug.php?id=28200 Reproduce code: --- -- Edit this bug report at http://bugs.php.net/?id=30399&edit=1
[PHP-DOC] cvs: phpdoc /en/reference/pcre/functions preg-match-all.xml preg-match.xml
vrana Tue Oct 12 03:49:13 2004 EDT Modified files: /phpdoc/en/reference/pcre/functions preg-match-all.xml preg-match.xml Log: offset VS substr (patch by Andrey Demenev) http://cvs.php.net/diff.php/phpdoc/en/reference/pcre/functions/preg-match-all.xml?r1=1.14&r2=1.15&ty=u Index: phpdoc/en/reference/pcre/functions/preg-match-all.xml diff -u phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.14 phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.15 --- phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.14 Tue Aug 10 12:30:20 2004 +++ phpdoc/en/reference/pcre/functions/preg-match-all.xml Tue Oct 12 03:49:05 2004 @@ -1,5 +1,5 @@ - + @@ -131,13 +131,23 @@ Normally, the search starts from the beginning of the subject string. The optional parameter offset can be used to specify - the alternate place from which to start the search. It is equivalent to - passing substr($subject, $offset) to - preg_match in place of the subject string. + the alternate place from which to start the search. The offset parameter is available since PHP 4.3.3. + + + Using offset is not equivalent to + passing substr($subject, $offset) to + preg_match in place of the subject string, because + pattern can contain assertions such as + ^, $ or + (?<=x). See preg_match for + examples. + + + Returns the number of full pattern matches (which might be zero), or &false; if an error occurred. http://cvs.php.net/diff.php/phpdoc/en/reference/pcre/functions/preg-match.xml?r1=1.15&r2=1.16&ty=u Index: phpdoc/en/reference/pcre/functions/preg-match.xml diff -u phpdoc/en/reference/pcre/functions/preg-match.xml:1.15 phpdoc/en/reference/pcre/functions/preg-match.xml:1.16 --- phpdoc/en/reference/pcre/functions/preg-match.xml:1.15 Tue Aug 10 12:30:20 2004 +++ phpdoc/en/reference/pcre/functions/preg-match.xml Tue Oct 12 03:49:06 2004 @@ -1,5 +1,5 @@ - + @@ -51,12 +51,71 @@ Normally, the search starts from the beginning of the subject string. The optional parameter offset can be used to specify - the alternate place from which to start the search. It is equivalent to - passing substr($subject, $offset) to - preg_match in place of the subject string. + the alternate place from which to start the search. The offset parameter is available since PHP 4.3.3. + + + Using offset is not equivalent to + passing substr($subject, $offset) to + preg_match in place of the subject string, because + pattern can contain assertions such as + ^, $ or + (?<=x). Compare: + + + + + + + will produce + + + + + + and + + + + + + will produce + + + + + + preg_match returns the number of times
Re: [PHP-DOC] [PATCH] preg_match and preg_match_all
On Tue, 12 Oct 2004, Andrey Demenev wrote: > Documentation on preg_match and preg_match_all incorrectly describes meaning > of offset parameter. Using offset parameter is NOT equivalent to passing > substr($subject, $offset) to preg_match in place of the subject string. > > Although I have karma to commit the patch, I would like it to be "approved" > first, since I never commited to "en" tree. The text looks okay to me, can't tell about the format though. Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org