Skip to content

Commit 1f65c4b

Browse files
authored
Merge pull request #880 from colshrapnel/patch-2
Delete the Variable declarations section
2 parents 43aa740 + 21ca28d commit 1f65c4b

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

pages/The-Basics.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -414,21 +414,3 @@ Since PHP 5.3, it is possible to leave out the middle part of the ternary operat
414414
Expression "expr1 ?: expr3" returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise.
415415
416416
* [Ternary operators](http://php.net/language.operators.comparison)
417-
418-
## Variable declarations
419-
420-
At times, coders attempt to make their code "cleaner" by declaring predefined variables with a different name. What
421-
this does in reality is to double the memory consumption of said script. For the example below, let us say an example
422-
string of text contains 1MB worth of data, by copying the variable you've increased the scripts execution to 2MB.
423-
424-
{% highlight php %}
425-
<?php
426-
$about = 'A very long string of text'; // uses 2MB memory
427-
echo $about;
428-
429-
// vs
430-
431-
echo 'A very long string of text'; // uses 1MB memory
432-
{% endhighlight %}
433-
434-
* [Performance tips](http://web.archive.org/web/20140625191431/https://developers.google.com/speed/articles/optimizing-php)

0 commit comments

Comments
 (0)