Answered Questions

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

    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

    Sachin

    • Jun 21st, 2014

    Single quotes will print the statement as a literal but double quotes prints the value for the variables also.....

    mart0

    • Feb 5th, 2014

    Single quotes for performance, no matter if there are variables or not!

  • What is the difference between echo and print?

    If anyboyd knows, do tell me.waiting for your prompt response.

    Nakato

    • Aug 18th, 2017

    Echo() can be used as part of an expression, while print() cant

    Abinash Kumar

    • Jun 20th, 2017

    Echo does not returns a value and is faster than print. While print is a language construct that returns 1 which makes it slower in page than echo