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

Why do we use polymorphism in php?

0 Answers  


How to get the position of the character in a string in php?

0 Answers  


Tell me what are the different types of errors in php?

0 Answers  


Does php need html?

0 Answers  


What is instantiation?

0 Answers  






Tell me what is the use of isset() in php?

0 Answers  


How to initiate a session in php?

0 Answers  


Do loops php?

0 Answers  


Can php use gettext?

0 Answers  


Write logic to print Floyd's triangle in PHP?

0 Answers  


Why do we use in php?

0 Answers  


How is session id stored in browser?

0 Answers  


Categories