Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Talk:Coding: Difference between revisions

From MoodleDocs
(Single quotes vs. double quotes: no noticable speed differences...)
 
m (Using clone())
Line 2: Line 2:


As PHP 4.3.0 is now the minimum version, the speed issue of single quotes vs. double quotes is negligible. See http://phplens.com/lens/php-book/optimizing-debugging-php.php, under "Useless Optimizations". There might be other reasons, however. I like to use "". ' is more convinient if a string has a lot of "s it it, like 'I have no "issues" with the "quotations"'. --[[User:Samuli Karevaara|Samuli Karevaara]] 04:26, 10 October 2006 (CDT)
As PHP 4.3.0 is now the minimum version, the speed issue of single quotes vs. double quotes is negligible. See http://phplens.com/lens/php-book/optimizing-debugging-php.php, under "Useless Optimizations". There might be other reasons, however. I like to use "". ' is more convinient if a string has a lot of "s it it, like 'I have no "issues" with the "quotations"'. --[[User:Samuli Karevaara|Samuli Karevaara]] 04:26, 10 October 2006 (CDT)
== Using clone() ==
Unless I'm mistaken, there are some cases where we should use Moodle's full_clone() method. Maybe someone could clarify this...

Revision as of 17:40, 3 July 2007

Single quotes vs. double quotes: no noticable speed differences...

As PHP 4.3.0 is now the minimum version, the speed issue of single quotes vs. double quotes is negligible. See http://phplens.com/lens/php-book/optimizing-debugging-php.php, under "Useless Optimizations". There might be other reasons, however. I like to use "". ' is more convinient if a string has a lot of "s it it, like 'I have no "issues" with the "quotations"'. --Samuli Karevaara 04:26, 10 October 2006 (CDT)

Using clone()

Unless I'm mistaken, there are some cases where we should use Moodle's full_clone() method. Maybe someone could clarify this...