On 2012-08-22 19:45, Lester Caine wrote:

Personally I'm looking for a 'Official Userland Library' that provides
EXAMPLES of how to do operations rather than yet another downloadable
library.

This is also the sort of thing I would like to see. The examples within the manual are written for exposition of the feature being described, not for Best Practice in their workaday use.

One example of the difference just off the top of my head is that weekly I see people asking about why they get "Undefined index" errors because they didn't check that $_POST['foo'] existed before they tried to use its value.

The page on external variables doesn't mention the fact that variables that might not exist need to be checked first, and none of the examples make such checks except for #4. (Nor should it have to, because the page is about external variables specifically, and this fact is true of variables in general - and _it_ is mentioned on the variable basics page).

>
There are a few such 'samples' in the manual, but the user added ones
tend to be messy, and finding them is rather hit and miss. I HAVE found
good samples, but getting back to them can be a problem.
>
User submission could be a source of examples, but any collection would require curating to ensure quality and maintain currency.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to