Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Stuart Herbert's Blog:
Dealing With PEAR Dependency Quirks
Mar 28, 2011 @ 16:09:56

Stuart Herbert has a new post to his blog today that shares some helpful hints about dependency quirks that can come with using PEAR packages and the PEAR installer.

To save myself a bit of effort, I thought it would make sense to make my API client reuse PEAR’s existing HTTP_Request2 component. No sense in re-inventing the wheel, I thought. But that’s where my troubles began. [...] There are a few quirks in the way that the PEAR installer handles version numbers, and you need to know how to deal with them if you’re going to re-use PEAR project components in your own apps.

He shows how a dependency can be set up for the HTTP_Request2 package as a part of the update to his project. He talks about changes to the project's package.xml file and the trick with version numbering to get the latest. In this case, the latest is a non-stable alpha/beta component and the package.xml file needs some special handling to cooperate there (version, stability, release, api and min/max).

tagged: pear dependency quirk tutorial httprequest2 package beta version

Link:

Tiffany Brown's Blog:
PHP Quickie: More on is_numeric vs. ctype_digit
Aug 17, 2006 @ 12:32:52

Tiffany Brown has posted an update to her look into is_numeric versus ctype_digit today, mentioning an issue she came across when testing based on the differences she found in her previous posting.

Just a quick follow-up to my post on is_numeric vs. ctype_digit. There is one quirk with ctype_digit that may affect your choice about whether to use it.

When the string in question is empty, ctype_digit returns TRUE. However, when it is null, ctype_digit will return FALSE.

She includes code to illustrate, noting the return of each function.

tagged: is_numeric ctype_digit quirk true false return is_numeric ctype_digit quirk true false return

Link:

Tiffany Brown's Blog:
PHP Quickie: More on is_numeric vs. ctype_digit
Aug 17, 2006 @ 12:32:52

Tiffany Brown has posted an update to her look into is_numeric versus ctype_digit today, mentioning an issue she came across when testing based on the differences she found in her previous posting.

Just a quick follow-up to my post on is_numeric vs. ctype_digit. There is one quirk with ctype_digit that may affect your choice about whether to use it.

When the string in question is empty, ctype_digit returns TRUE. However, when it is null, ctype_digit will return FALSE.

She includes code to illustrate, noting the return of each function.

tagged: is_numeric ctype_digit quirk true false return is_numeric ctype_digit quirk true false return

Link:


Trending Topics: