Anyone know about PHP?
#10

Quote:
Originally Posted by Sinner
Посмотреть сообщение
There is no difference between single and double quotes in php. It's just good practice to use single quotes for arrays/indexes and double qoutes for declarations of strings (although it's more of a personal preference - I use single quotes as much as I can).

For example, it's common to do:
PHP код:
$_GLOBALS['some_index'
and:
PHP код:
$string "This is a string"
EDIT: There isn't a difference in performance either (not in the new PHP versions anyways).
http://nikic.github.io/2012/01/09/Di...ance-Myth.html
https://www.youtube.com/watch?v=kj0JwIdJS0o

This is a little out-dated but it shows a difference between the two.

But you can code however you want.. that's just a tip.
Reply


Messages In This Thread
Anyone know about PHP? - by Coltmaster - 07.04.2013, 22:28
Respuesta: Anyone know about PHP? - by OPremium - 07.04.2013, 22:46
Re: Anyone know about PHP? - by Pizzy - 07.04.2013, 22:48
Re: Anyone know about PHP? - by Coltmaster - 07.04.2013, 23:28
Re: Anyone know about PHP? - by Pizzy - 07.04.2013, 23:59
Re: Anyone know about PHP? - by Coltmaster - 08.04.2013, 00:11
Re: Anyone know about PHP? - by spacemud - 08.04.2013, 00:26
Re: Anyone know about PHP? - by Coltmaster - 08.04.2013, 00:41
Re: Anyone know about PHP? - by Sinner - 08.04.2013, 09:44
Re: Anyone know about PHP? - by InfiniTy. - 08.04.2013, 10:34

Forum Jump:


Users browsing this thread: 1 Guest(s)