This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~/(admin|wp-admin|backend){ | |
access_log off; | |
log_not_found off; | |
return 404; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[In reply to Moroshka] | |
Распишу по буквам, потом в совокупности | |
S - (SRP): | |
https://www.youtube.com/watch?v=AEnePs2Evg0 | |
https://goo.gl/LatDmF (link wikipedia) | |
O - (Open/closed): | |
https://www.youtube.com/watch?v=DJF_sGOs2V4 | |
https://goo.gl/6p3jfY (link wikipedia) | |
L - (Liskov): | |
https://www.youtube.com/watch?v=bVwZquRH1Vk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$string = 'string'; | |
$double = 12.12345; | |
$array = ['foo', 'bar']; | |
$a = 555; | |
$b = 'ZZZ'; | |
var_dump(@($a + $b)); | |
var_dump($a . $b); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Insta-perf-improvement for any #PHP codebase: | |
//replace ` | |
foreach ($b as $a) { $c = array_merge($c, $a) } | |
// with | |
array_merge($c, [], ...$b) |
OlderNewer