Searching for "%"

Q:

If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b?

Answer 100, it’s a reference to existing variable.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

Q:

Will comparison of string "10" and integer 11 work in PHP?

Answer Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

Q:

I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?

Answer PHP Interpreter treats numbers beginning with 0 as octal. Look at the similar PHP interview questions for more numeric problems.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

Q:

What does a special set of tags do in PHP?

Answer The output is displayed directly to the browser.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

Q:

How do I find out the number of parameters passed into function?

Answer func_num_args() function returns the number of parameters passed in.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

Q:

Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?

Answer In this example it wouldn’t matter, since the variable is all by itself, but if you were to print something like "{$a},000,000 mln dollars", then you definitely need to use the braces.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

Q:

So if md5( ) generates the most secure hash, why would you ever use the less secure crc32( ) and sha1( )?

Answer Crypto usage in PHP is simple, but that doesn’t mean it’s free. First off, depending on the data that you’re encrypting, you might have reasons to store a 32-bit value in the database instead of the 160-bit value to save on space. Second, the more secure the crypto is, the longer is the computation time to deliver the hash value. A high volume site might be significantly slowed down, if frequent md5() generation is required.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

Q:

With a heredoc syntax, do I get variable substitution inside the heredoc contents?

Answer Yes
Report Error

View answer Workspace Report Error Discuss

Subject: PHP