Would you initialize your strings with single quotes or
double quotes?

Answers were Sorted based on User's Feedback



Would you initialize your strings with single quotes or double quotes?..

Answer / rajan vardawaj

Since the data inside the single-quoted string is not parsed
for variable substitution, it’s always a better idea
speed-wise to initialize a string with single quotes, unless
you specifically need variable substitution.

Is This Answer Correct ?    22 Yes 5 No

Would you initialize your strings with single quotes or double quotes?..

Answer / srimanta chakraborty

if in the string,substitution is needed then initialize with
double quotes else single quotes, as it will become fast.

Is This Answer Correct ?    7 Yes 2 No

Would you initialize your strings with single quotes or double quotes?..

Answer / srimanta chakraborty

if in the special character is there then initialize with
double quotes else single quotes, as it will become fast.

Is This Answer Correct ?    5 Yes 5 No

Would you initialize your strings with single quotes or double quotes?..

Answer / jitendra k jain

we can initialize string with single quotes,but in special character case, we need to initialize string with double quotes.the best way to define string with double quote.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More PHP Interview Questions

What is the purpose of the php empty function?

0 Answers  


How do you check if a variable has been set in php?

0 Answers  


What types of images that PHP supports?

2 Answers  


hi i am complted my b.tech and i want to learn php is php is good for my career and i want to know the salary growth on php any one can tell the answer plz and i am learning php myself it is easy to understand..........

3 Answers  


Which function would you use to read a line of data from a file in php?

0 Answers  






Which framework is best for php development?

0 Answers  


What is difference between get and post in php?

0 Answers  


What does $_env means?

0 Answers  


What is the main difference between asp net and php?

0 Answers  


Difference between array_combine and array_merge?

0 Answers  


What are variables in research examples?

0 Answers  


What are magic methods?

0 Answers  


Categories