Searching for "M"

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:

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:

What’s the difference between accessing a class method via -> and via ::?

Answer :: is allowed to access methods that can perform static operations, i.e. those, which do not require object initialization.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

Q:

When are you supposed to use endif to end the conditional statement?

Answer When the original if was followed by : and then the code block without braces.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

Q:

Do you prefer to work on your own or as part of team?

Answer

Even if you like to work as a team or independent. Make sure you show interest in both, As most jobs require you to work both as part of team and independent.

In general, the idea is to say what you prefer without being negative about the thing you don’t.

Independently -
If you have done enough research on the job posting and mostly need to work independently then you can say something like “I prefer to work alone, but I find that occasionally working with a team feels creative and fun. Always felt, it is easy to solve problems being part of a team.

Work in a Team -
On the other hand, if your research says that your job requires working in a team then you can say something like "I like the dynamics of working in a team, but do like working independently when the assignment requires it.”

Report Error

View answer Workspace Report Error Discuss

Subject: Team Work

Q:

How Do You Manage to Balance Career and Family?

Answer

If you're attempting to give an answer that is as unrevealing as possible, try something like this:


  " I have been a dedicated,loyal,hardworking employee throughout my career and nothing in my personal life-family obligations, hobbies, or volunteer work-has ever affected my performance. Nor would I ever expect it to." 

Report Error

View answer Workspace Report Error Discuss