Participation is free and the site has a strict confidentiality policy. The KudoZ network provides a framework for translators and others to assist each other with translations or explanations of terms and short phrases. You can request verification for native languages by completing a simple application that takes only a couple of minutes. Review native language verification applications submitted by your peers. Reviewing applications can be fun and only takes a few minutes. KudoZ activity Questions: 77 none open 1 without valid answers 2 closed without grading Answers: 1.
Grading comment 4 KudoZ points were awarded for this answer. Discussion entries: 0. Automatic update in Peer comments on this answer and responses from the answerer. Return to KudoZ list. View Ideas submitted by the community.
Post Your ideas for ProZ. Vote Promote or demote ideas. View forum View forum without registering on UserVoice. You have native languages that can be verified You can request verification for native languages by completing a simple application that takes only a couple of minutes.
View applications. Close and don't show again Close.
Close search. Term search Jobs Translators Clients Forums. Term search All of ProZ. Spanish term or phrase:. Margarita Ezquerra Smart Translators, S. Spanish term or phrase: arreglo. Note that checking the existence of a subkey of an array when that subkey does not exist but the parent does and is a string will return false for empty.
Non-integer types are converted to integer. Be careful, if "0" zero as a string , 0 zero as an integer and -0 minus zero as an integer return true, "-0" minus zero as a string yes, I already had some customers that wrote -0 into a form field returns false. I can't use empty in all situations because '0' is usually not considered empty to me. I did a quick benchmark over the most common ways of testing it.
I would encourage the use of trim which would most likely be faster haven't tested and easier. Trim also takes care of other white space like line breaks and tabs. The good thing about doing this is that you never have to worry about 'trimming' your input which makes your code easier and more reliable incase you forget to trim some input. Simple solution for: "Fatal error: Can't use function return value in write context in Besides that, it automatically documents the code.
I know that the statement in the "Return Values" section of the manual already says this in reverse: "Returns FALSE if var has a non-empty and non-zero value. Its supposed to return TRUE for unset variables!!!
I normally count an array, so I wanted to see how empty would stack up. Since end of lines are not always easy to spot this can be confusing.
This is NOT true. On production systems, warnings are usually shut off, but they are often active on development systems.
On entries like name, profession, Note that empty will return false on null byte. For who don't want to test what happen if passed an array element here is my test and result. Or you'll have fun when someone wants to put "0" in a field. Checking if a variable is empty or not when you have more than one will add so many similar lines to your code; and will require re-writing of course. Hope that helps.
So as a result i wrote a small function to replace the php empty function in situations where you want 0 and "0" not to be considered empty. This parameter is false by default.