Results 1 to 4 of 4

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

  1. #1
    Join Date
    Nov 2010
    Posts
    2

    Default 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.
    --
    hotels in goa
    resorts in goa

  2. #2
    Join Date
    Aug 2010
    Posts
    15

    Smile To intialize strings with single quotes

    Both are good but I would prefer & recommend that we go for initializing string with single quotes which would help in speeding process

  3. #3
    Join Date
    Feb 2011
    Posts
    3

    Default

    Single quote strings are executed faster than double quotes
    When we use single quote for string then php will not parse the things between that quote. It simply assign as it is.
    But when we use double quotes then it will parse for variables and other things between double quotes.

  4. #4
    Join Date
    Apr 2011
    Posts
    6

    Default

    If the string is enclosed in double-quotes PHP understands more escape sequences for special characters. Escape sequences for special characters will not be expanded when they occur in single quoted strings.

Similar Threads

  1. Double Ram on Windows VPS - Is aspnix.com reliable?
    By №Lucky in forum Web Hosting Solutions
    Replies: 9
    Last Post: 03-22-2012, 01:49 PM
  2. Funny quotes and sayings funny
    By KajolThappar in forum Web Hosting Community
    Replies: 2
    Last Post: 03-16-2011, 10:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •