PHP tips

トップ > チップス > PHP tips
2012-02-14, php

In PHP, the following values all evaluate to false: The empty string ("") and the string "0"

incrementing "z" or "Z" wraps it back to "a" or "Z" and increments the previous character by one, as though the characters were in a base-26 number system.

Not every cast is useful. Casting an array to a numeric type gives 1 , and casting an array to a string gives "Array" (seeing this in your output is a sure sign that you've printed a variable that contains an array).

Error suppression ( @ )

Execution ( '...' ) The backtick operator executes the string contained between the backticks as a shell command and returns the output.

この記事は役に立ちましたか?