ȸ¿ø°¡ÀԡžÆÀ̵ð/ºñ¹øã±â
ȨÀ¸·Î

PHP Äڵ带 ÃÖÀûÈ­ÇÏ´Â 40°¡Áö ÆÁ
13³â Àü
°¡²û PHP·Î À¥ÆäÀÌÁö¸¦ ÀÛ¼ºÇÒ ÀÏÀÌ Àִµ¥, À¯¿ëÇÑ ÆÁÀ» ¿ì¿¬È÷ º¸°Ô µÇ¾î Çѱ۷Π¿Å°ÜÀû¾îº»´Ù.
¿øº»Àº 40 Tips for optimizing your php Code

1. If a method can be static, declare it static. Speed improvement is by a factor of 4.
¸Þ½îµå°¡ staticÀÌ µÉ ¼ö ÀÖ´Ù¸é staticÀ¸·Î ¼±¾ðÇ϶ó. 4¹è »¡¶óÁø´Ù.

2. echo is faster than print.
echo°¡ printº¸´Ù ºü¸£´Ù.

3. Use echo¡¯s multiple parameters instead of string concatenation.
¹®ÀÚ¿­À» À̾îºÙÀÌÁö ¸»°í, echo¸¦ ÀÌ¿ëÇÏ¿© ¿©·¯ °³ÀÇ ÆĶó¹ÌÅ͸¦ Àû¾î¶ó.

4. Set the maxvalue for your for-loops before and not in the loop.
for ·çÇÁÀ» À§ÇÚ ÃÖ´ë°ª(Å»ÃâÁ¶°Ç)À» ·çÇÁ ¾È¿¡¼­°¡ ¾Æ´Ï°í ·çÇÁ ½ÃÀÛ ÀÌÀü¿¡ ÁöÁ¤Ç϶ó.

5. Unset your variables to free memory, especially large arrays.
¸Þ¸ð¸®¸¦ ÇØÁ¦Çϱâ À§ÇØ º¯¼ö¸¦ unsetÇ϶ó. ƯÈ÷ Ä¿´Ù¶õ ¹è¿­Àº ±×·¡¾ß µÈ´Ù.

6. Avoid magic like __get, __set, __autoload
__get, __set, __autoload¿Í °°Àº ¸¶¹ýÀ» ÇÇÇضó.

7. require_once() is expensive
require_once()´Â ºñ½Î´Ù.

8. Use full paths in includes and requires, less time spent on resolving the OS paths.
include¿Í require¸¦ »ç¿ëÇÒ ¶§, °æ·Î¸¦ ã´Âµ¥ ½Ã°£ÀÌ Àû°Ô °É¸®´Â full path¸¦ »ç¿ëÇ϶ó.

9. If you need to find out the time when the script started executing, $_SERVER[¡¯REQUEST_TIME¡¯] is preferred to time()
½ºÅ©¸³Æ®°¡ ¾ðÁ¦ ½ÇÇàÇß´ÂÁö ¾Ë°í ½ÍÀ¸¸é time()º¸´Ù $_SERVER[¡¯REQUEST_TIME¡¯]ÀÌ ÁÁ´Ù.

10. See if you can use strncasecmp, strpbrk and stripos instead of regex
Á¤±ÔÇ¥Çö½Äº¸´Ù´Â °¡´ÉÇϸé strncasecmp³ª strpbrk, stripos¸¦ »ç¿ëÇ϶ó.
* ¿ªÁÖ
strncasecmp: µÎ ¹®ÀÚ¿­ÀÇ ¾ÕÂÊ ÀϺΰ¡ ´ë¼Ò¹®ÀÚ ±¸ºÐ¾øÀÌ ÀÏÄ¡ÇÏ´ÂÁö È®ÀÎÇÒ ¶§ »ç¿ë
strpbrk: ¹®ÀÚ ÁýÇÕ¿¡ ¼ÓÇÑ Æ¯Á¤ ¹®ÀÚ°¡ ¹®ÀÚ¿­¿¡ ³ªÅ¸³ª´ÂÁö È®ÀÎÇÒ ¶§ »ç¿ë
stripos: ´ë¼Ò¹®ÀÚ ±¸ºÐ¾øÀÌ Æ¯Á¤ ¹®ÀÚ¿­ÀÌ ´Ù¸¥ ¹®ÀÚ¿­¿¡ Æ÷ÇԵǴÂÁö È®ÀÎÇÒ ¶§ »ç¿ë

11. str_replace is faster than preg_replace, but strtr is faster than str_replace by a factor of 4
str_replace°¡ preg_replaceº¸´Ù ºü¸£Áö¸¸, strtrÀº str_replaceº¸´Ù 4¹è ºü¸£´Ù.

12. If the function, such as string replacement function, accepts both arrays and single characters as arguments, and if your argument list is not too long, consider writing a few redundant replacement statements, passing one character at a time, instead of one line of code that accepts arrays as search and replace arguments.
¸¸¾à ¹®ÀÚ¿­ ±³Ã¼ °°Àº ÇÔ¼ö°¡ ¹è¿­°ú ¹®ÀÚ¿­À» ÀÎÀÚ·Î ¹Þ¾ÆµéÀ̸é, ±×¸®°í ±× ÀÎÀÚ ¸®½ºÆ®°¡ ±æÁö ¾Ê´Ù¸é, ¹è¿­À» ÇÑ ¹ø¿¡ ¹Þ¾Æµé¿©¼­ ó¸®ÇÏ´Â °Í ´ë½Å¿¡ ÇÑ ¹ø¿¡ ¹®ÀÚ¿­À» Çϳª¾¿ ³Ñ°Ü¼­ ó¸®ÇÏ´Â °ÍÀ» °í·ÁÇغÁ¶ó.

13. It¡¯s better to use select statements than multi if, else if, statements.
¿©·¯ °³ÀÇ if/else if ¹®Àå ´ë½Å¿¡ select ¹®ÀåÀ» »ç¿ëÇÏ´Â °Ô ´õ ÁÁ´Ù.

14. Error suppression with @ is very slow.
@¸¦ ÀÌ¿ëÇÑ ¿¡·¯ Ãâ·Â ¹æÁö´Â ¸Å¿ì ´À¸®´Ù.

15. Turn on apache¡¯s mod_deflate
ApacheÀÇ mod_deflate¸¦ ÄѶó.
*¿ªÁÖ
mod_deflate´Â ¼­¹öÀÇ Ãâ·ÂÀ» Ŭ¶óÀ̾ðÆ®¿¡°Ô º¸³»±â Àü¿¡ ¾ÐÃàÇÏ´Â ¸ðµâÀÓ

16. Close your database connections when you¡¯re done with them
DB¸¦ ´Ù »ç¿ëÇßÀ¸¸é ¿¬°áÀ» ´Ý¾Æ¶ó.

17. $row[¡¯id¡¯] is 7 times faster than $row[id]
$row[¡¯id¡¯]°¡ $row[id]º¸´Ù 7¹è ºü¸£´Ù.

18. Error messages are expensive
¿¡·¯ ¸Þ½ÃÁö´Â ºñ½Î´Ù.

19. Do not use functions inside of for loop, such as for ($x=0; $x < count($array); $x) The count() function gets called each time.
for ·çÇÁÀÇ Ç¥Çö½Ä ¾È¿¡¼­ ÇÔ¼ö¸¦ »ç¿ëÇÏÁö ¸¶¶ó.
for ($x = 0; $x < count($array); $x)¿¡¼­ count() ÇÔ¼ö°¡ ¸Å¹ø È£ÃâµÈ´Ù.

20. Incrementing a local variable in a method is the fastest. Nearly the same as calling a local variable in a function.
¸Þ½îµå ¾È¿¡¼­ Áö¿ª º¯¼ö¸¦ Áõ°¡½ÃÅ°´Â °ÍÀÌ °ÅÀÇ ÇÔ¼ö ¾È¿¡¼­ Áö¿ª º¯¼ö¸¦ È£Ãâ(Áõ°¡?)ÇÏ´Â °Í¸¸Å­ ºü¸£´Ù.

21. Incrementing a global variable is 2 times slow than a local var.
Àü¿ª º¯¼ö¸¦ Áõ°¡½ÃÅ°´Â °ÍÀÌ Áö¿ª º¯¼ö¸¦ Áõ°¡½ÃÅ°´Â °Íº¸´Ù 2¹è ´À¸®´Ù.

22. Incrementing an object property (eg. $this->prop++) is 3 times slower than a local variable.
°´Ã¼ÀÇ ¸â¹öº¯¼ö¸¦ Áõ°¡½ÃÅ°´Â °ÍÀÌ Áö¿ª º¯¼ö¸¦ Áõ°¡½ÃÅ°´Â °Íº¸´Ù 3¹è ´À¸®´Ù.

23. Incrementing an undefined local variable is 9-10 times slower than a pre-initialized one.
°ªÀÌ ÁöÁ¤µÇÁö ¾ÊÀº Áö¿ª º¯¼ö¸¦ Áõ°¡½ÃÅ°´Â °ÍÀÌ ¹Ì¸® ÃʱâÈ­µÈ º¯¼ö¸¦ Áõ°¡½ÃÅ°´Â °Íº¸´Ù 9~10¹è ´À¸®´Ù.

24. Just declaring a global variable without using it in a function also slows things down (by about the same amount as incrementing a local var). PHP probably does a check to see if the global exists.
Àü¿ª º¯¼ö¸¦ ÇÔ¼ö ¾È¿¡¼­ »ç¿ëÇÏÁö ¾ÊÀ¸¸é¼­ ±×Àú ¼±¾ðÇϱ⸸ Çصµ (Áö¿ª º¯¼ö¸¦ Áõ°¡½ÃÅ°´Â °Í¸¸Å­) ´À·ÁÁø´Ù. PHP´Â ¾Æ¸¶ Àü¿ª º¯¼ö°¡ Á¸ÀçÇÏ´ÂÁö ¾Ë±â À§ÇØ °Ë»ç¸¦ ÇÏ´Â °Í °°´Ù.

25. Method invocation appears to be independent of the number of methods defined in the class because I added 10 more methods to the test class (before and after the test method) with no change in performance.
¸Þ½îµå È£ÃâÀº Ŭ·¡½º ¾È¿¡¼­ Á¤ÀÇµÈ ¸Þ½îµåÀÇ °¹¼ö¿¡ µ¶¸³ÀûÀÎ µí ÇÏ´Ù. ¿Ö³ÄÇϸé 10°³ÀÇ ¸Þ½îµå¸¦ Å×½ºÆ® Ŭ·¡½º¿¡ Ãß°¡ÇغÃÀ¸³ª ¼º´É¿¡ º¯È­°¡ ¾ø¾ú±â ¶§¹®ÀÌ´Ù.

26. Methods in derived classes run faster than ones defined in the base class.
ÆÄ»ýµÈ Ŭ·¡½ºÀÇ ¸Þ½îµå°¡ º£À̽º Ŭ·¡½º¿¡¼­ Á¤ÀÇµÈ °Íº¸´Ù ´õ ºü¸£°Ô µ¿ÀÛÇÑ´Ù.

27. A function call with one parameter and an empty function body takes about the same time as doing 7-8 $localvar++ operations. A similar method call is of course about 15 $localvar++ operations.
ÇÑ °³ÀÇ ¸Å°³º¯¼ö¸¦ °¡Áö°í ÇÔ¼ö¸¦ È£ÃâÇÏ°í ÇÔ¼ö ¹Ùµð°¡ ºñ¾îÀÖ´Ù¸é(ÇÔ¼ö ³»ºÎ¿¡¼­ ¾Æ¹«°Íµµ ½ÇÇàÇÏÁö ¾Ê´Â´Ù¸é) ±×°ÍÀº 7~8°³ÀÇ Áö¿ªº¯¼ö¸¦ Áõ°¡½ÃÅ°´Â °Í°ú ¶È°°Àº ½Ã°£À» Â÷ÁöÇÑ´Ù. ºñ½ÁÇÑ ¸Þ½îµå È£ÃâÀº ¸¶Âù°¡Áö·Î 15°³ÀÇ Áö¿ªº¯¼ö¸¦ Áõ°¡½ÃÅ°´Â ¿¬»êÂë µÈ´Ù.

28. Surrounding your string by ¡® instead of ¡± will make things interpret a little faster since php looks for variables inside ¡°¡¦¡± but not inside ¡®¡¦¡¯. Of course you can only do this when you don¡¯t need to have variables in the string.
¹®ÀÚ¿­À» ÀÌÁß µû¿ÈÇ¥ ´ë½Å¿¡ ´ÜÀÏ µû¿ÈÇ¥·Î µÑ·¯½Î´Â °ÍÀº Á» ´õ ºü¸£°Ô Çؼ®µÇµµ·Ï ÇÑ´Ù. ¿Ö³ÄÇϸé PHP°¡ ÀÌÁß µû¿ÈÇ¥ ¾ÈÀÇ º¯¼ö¸¦ ã¾Æº¸Áö¸¸ ´ÜÀÏ µû¿ÈÇ¥ ¾È¿¡¼­´Â º¯¼ö¸¦ ãÁö ¾Ê±â ¶§¹®ÀÌ´Ù. ¹°·Ð ¹®ÀÚ¿­ ¾È¿¡¼­ º¯¼ö¸¦ °¡Áú ÇÊ¿ä°¡ ¾øÀ» ¶§¸¸ ÀÌ·¸°Ô »ç¿ëÇÒ ¼ö ÀÖ´Ù.

29. When echoing strings it¡¯s faster to separate them by comma instead of dot. Note: This only works with echo, which is a function that can take several strings as arguments.
¹®ÀÚ¿­À» echoÇÒ ¶§ ¸¶Ä§Ç¥ ´ë½Å¿¡ ½°Ç¥·Î ºÐ¸®ÇÏ´Â °ÍÀÌ ´õ ºü¸£´Ù.
ÁÖÀÇ: ÀÌ°ÍÀº ¿©·¯ ¹®ÀÚ¿­À» ÀÎÀÚ·Î ¹Þ¾ÆµéÀÌ´Â ÇÔ¼öÀÎ echo·Î¸¸ ÀÛµ¿ÇÑ´Ù.

30. A PHP script will be served at least 2-10 times slower than a static HTML page by Apache. Try to use more static HTML pages and fewer scripts.
Apache¿¡ ÀÇÇØ PHP ½ºÅ©¸³Æ®´Â Á¤Àû HTML ÆäÀÌÁöº¸´Ù ÃÖ¼Ò 2¿¡¼­ 10¹è ´À¸®°Ô ¼­ºñ½ºµÈ´Ù. ´õ ¸¹Àº Á¤Àû HTML ÆäÀÌÁö¿Í ´õ ÀûÀº ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÏ·Á°í ³ë·ÂÇ϶ó.

31. Your PHP scripts are recompiled every time unless the scripts are cached. Install a PHP caching product to typically increase performance by 25-100% by removing compile times.
PHP ½ºÅ©¸³Æ®´Â ij½ÃµÇÁö ¾ÊÀ¸¸é ¸Å¹ø Àç ÄÄÆÄÀϵȴÙ. ÄÄÆÄÀÏ ½Ã°£À» Á¦°ÅÇÔÀ¸·Î½á 25~100%¸¸Å­ÀÇ ¼º´ÉÀ» Áõ°¡½ÃÅ°±â À§ÇØ PHP ij½Ì µµ±¸¸¦ ¼³Ä¡Ç϶ó.

32. Cache as much as possible. Use memcached - memcached is a high-performance memory object caching system intended to speed up dynamic web applications by alleviating database load. OP code caches are useful so that your script does not have to be compiled on every request
°¡´ÉÇÑ ÇÑ ¸¹ÀÌ Ä³½ÃÇ϶ó. memcached¸¦ »ç¿ëÇ϶ó. memcached´Â °í¼º´É ¸Þ¸ð¸® °´Ã¼ ij½Ì ½Ã½ºÅÛÀÌ´Ù.

33. When working with strings and you need to check that the string is either of a certain length you¡¯d understandably would want to use the strlen() function. This function is pretty quick since it¡¯s operation does not perform any calculation but merely return the already known length of a string available in the zval structure (internal C struct used to store variables in PHP). However because strlen() is a function it is still somewhat slow because the function call requires several operations such as lowercase & hashtable lookup followed by the execution of said function. In some instance you can improve the speed of your code by using an isset() trick.
¹®ÀÚ¿­À» °¡Áö°í ÀÛ¾÷ÇÏ¸ç ¹®ÀÚ¿­ÀÌ Æ¯Á¤ ±æÀÌÀÎÁö È®ÀÎÇÒ ÇÊ¿ä°¡ ÀÖÀ» ¶§, strlen() ÇÔ¼ö¸¦ ¾µ °ÍÀÌ´Ù. ÀÌ ÇÔ¼ö´Â °è»ê¾øÀÌ zval ±¸Á¶Ã¼¿¡¼­ »ç¿ëÇÒ ¼ö ÀÖ´Â ÀÌ¹Ì ¾Ë·ÁÁø ¹®ÀÚ¿­ ±æÀ̸¦ ¹ÝȯÇϱ⠶§¹®¿¡ ¸Å¿ì ºü¸£´Ù. ±×·¯³ª strlen()ÀÌ ÇÔ¼öÀ̱⠶§¹®¿¡ ¿©ÀüÈ÷ Á¶±Ý ´À¸®´Ù. ¿Ö³ÄÇϸé ÇÔ¼ö È£ÃâÀº ¾ð±ÞµÈ ÇÔ¼öÀÇ ½ÇÇà µÚ¿¡ lowercase¿Í hashtable lookup°°Àº ¿©·¯ °³ÀÇ ¿¬»êÀ» È£ÃâÇϱ⠶§¹®ÀÌ´Ù. ¾î¶² °æ¿ì¿¡´Â isset() Æ®¸¯À» ÀÌ¿ëÇÏ¿© ÄÚµåÀÇ ½ºÇǵ带 Áõ°¡½Ãų ¼öµµ ÀÖ´Ù.

Ex.
if (strlen($foo) < 5) { echo "Foo is too short"; }
vs.
if (!isset($foo{5})) { echo "Foo is too short"; }

Calling isset() happens to be faster then strlen() because unlike strlen(), isset() is a language construct and not a function meaning that it's execution does not require function lookups and lowercase. This means you have virtually no overhead on top of the actual code that determines the string's length.
isset()À» È£ÃâÇÏ´Â °ÍÀº strlen()°ú´Â ´Þ¸® isset()ÀÌ ¾ð¾î ±âº»¹®¹ýÀÌ°í ÇÔ¼ö°¡ ¾Æ´Ï±â ¶§¹®¿¡ ÇÔ¼ö ã¿Í lowercase ÀÛ¾÷À» ÇÊ¿ä·Î ÇÏÁö ¾ÊÀ¸¹Ç·Î strlen()º¸´Ù ´õ ºü¸¦ ¼öµµ ÀÖ´Ù. ÀÌ°ÍÀº °¡»óÀûÀ¸·Î ¹®ÀÚ¿­ÀÇ ±æÀ̸¦ °áÁ¤ÇÏ´Â ½ÇÁ¦ Äڵ忡 °úºÎÇÏ°¡ ¾ø´Ù´Â °ÍÀ» ÀǹÌÇÑ´Ù.

34. When incrementing or decrementing the value of the variable $i++ happens to be a tad slower then ++$i. This is something PHP specific and does not apply to other languages, so don't go modifying your C or Java code thinking it'll suddenly become faster, it won't. ++$i happens to be faster in PHP because instead of 4 opcodes used for $i++ you only need 3. Post incrementation actually causes in the creation of a temporary var that is then incremented. While pre-incrementation increases the original value directly. This is one of the optimization that opcode optimized like Zend's PHP optimizer. It is a still a good idea to keep in mind since not all opcode optimizers perform this optimization and there are plenty of ISPs and servers running without an opcode optimizer.
º¯¼ö $iÀÇ °ªÀ» Áõ°¡½ÃÅ°°Å³ª °¨¼ÒŰų ¶§, $i++Àº ++$iº¸´Ù Á¶±Ý ´õ ´À¸± ¼ö ÀÖ´Ù. ÀÌ°ÍÀº PHPÀÇ Æ¯Â¡ÀÌ°í ´Ù¸¥ ¾ð¾î¿¡´Â ÇØ´çµÇÁö ¾ÊÀ¸´Ï Á» ´õ »¡¶óÁú °ÍÀ» ±â´ëÇϸ鼭 C³ª Java Äڵ带 ¹Ù²Ù·¯ °¡Áö ¸¶¶ó. ¾È »¡¶óÁú °ÍÀÌ´Ù. ++$i´Â PHP¿¡¼­ Á» ´õ ºü¸¥µ¥ ±×°ÍÀº $i++¿¡ 4°³ÀÇ opcode°¡ »ç¿ëµÇ´Â ´ë½Å¿¡ 3°³¸¸ ÇÊ¿äÇϱ⠶§¹®ÀÌ´Ù. ÈÄÁõ°¡´Â »ç½Ç Áõ°¡µÉ Àӽú¯¼öÀÇ »ý¼ºÀ» ÃÊ·¡ÇÑ´Ù. ¹Ý¸é¿¡ ÀüÁõ°¡´Â ¿ø·¡ °ªÀ» Á÷Á¢ Áõ°¡½ÃŲ´Ù. ÀÌ°ÍÀº opcode°¡ ZendÀÇ PHP optimizeró·³ ÃÖÀûÈ­ÇÏ´Â ÃÖÀûÈ­ ±â¹ýÀÇ ÇϳªÀÌ´Ù. ¸ðµç opcode optimizerµéÀÌ ÀÌ ÃÖÀûÈ­¸¦ ¼öÇàÇÏ´Â °ÍÀº ¾Æ´Ï°í ¸¹Àº ISP¿Í serverµéÀÌ opcode optimizer¾øÀÌ ¼öÇàµÇ°í Àֱ⠶§¹®¿¡ ¸í½ÉÇÏ´Â °Ô ÁÁÀ» °ÍÀÌ´Ù.

35. Not everything has to be OOP, often it is too much overhead, each method and object call consumes a lot of memory.
¸ðµç °ÍÀÌ OOPÀÏ ÇÊ¿ä´Â ¾ø´Ù. Á¾Á¾ ±×°ÍÀº ³Ê¹« ¸¹Àº °úºÎÇÏ°¡ µÈ´Ù. °¢°¢ÀÇ ¸Þ½îµå¿Í °´Ã¼ È£ÃâÀº ¸Þ¸ð¸®¸¦ ¸¹ÀÌ ¼ÒºñÇÑ´Ù.

36. Do not implement every data structure as a class, arrays are useful, too
¸ðµç µ¥ÀÌÅÍ ±¸Á¶¸¦ Ŭ·¡½º·Î ±¸ÇöÇÏÁö ¸¶¶ó. ¹è¿­µµ À¯¿ëÇÏ´Ù.

37. Don't split methods too much, think, which code you will really re-use
¸Þ½îµå¸¦ ³Ê¹« ¸¹ÀÌ ºÐ¸®ÇÏÁö ¸¶¶ó. ¾î¶² Äڵ带 Á¤¸» Àç»ç¿ëÇÒÁö »ý°¢ÇغÁ¶ó.

38. You can always split the code of a method later, when needed
Ç×»ó ¸Þ½îµåÀÇ Äڵ带 ³ªÁß¿¡ ÇÊ¿äÇÒ ¶§ ºÐ¸®ÇÒ ¼ö ÀÖ´Ù.

39. Make use of the countless predefined functions
¼ö¸¹Àº ¹Ì¸® Á¤ÀÇµÈ ÇÔ¼ö¸¦ È°¿ëÇضó.

40. If you have very time consuming functions in your code, consider writing them as C extensions
¸Å¿ì ½Ã°£À» ¼ÒºñÇÏ´Â ÇÔ¼ö°¡ ÀÖ´Ù¸é, C È®ÀåÀ¸·Î ÀÛ¼ºÇÏ´Â °ÍÀ» °í·ÁÇغÁ¶ó.

41. Profile your code. A profiler shows you, which parts of your code consumes how many time. The Xdebug debugger already contains a profiler. Profiling shows you the bottlenecks in overview
´ç½ÅÀÇ Äڵ带 ÇÁ·ÎÆÄÀÏÇغÁ¶ó. ÇÁ·ÎÆÄÀÏ·¯´Â ÄÚµåÀÇ ¾î¶² ºÎºÐÀÌ °¡Àå ¸¹Àº ½Ã°£À» ¼ÒºñÇÏ´ÂÁö º¸¿©ÁØ´Ù. Xdebug µð¹ö°Å´Â ÀÌ¹Ì ÇÁ·ÎÆÄÀÏ·¯¸¦ Æ÷ÇÔÇÏ°í ÀÖ´Ù. ÇÁ·ÎÆÄÀϸµÀº ÀüüÀûÀÎ º´¸ñÀ» º¸¿©ÁØ´Ù.

42. mod_gzip which is available as an Apache module compresses your data on the fly and can reduce the data to transfer up to 80%
Apache ¸ðµâ·Î »ç¿ë°¡´ÉÇÑ mod_gzipÀº ½ÇÇà Áß¿¡ µ¥ÀÌÅ͸¦ ¾ÐÃàÇÏ¿© Àü¼ÛÇÒ µ¥ÀÌÅ͸¦ 80%±îÁö ÁÙÀÏ ¼ö ÀÖ´Ù.

43. Excellent Article about optimizing php by John Lim
John LimÀÇ PHP¸¦ ÃÖÀûÈ­ÇÏ´Â °Í¿¡ °üÇÑ ¶Ù¾î³­ ±Û

ÃßõÃßõ : 196 Ãßõ ¸ñ·Ï
¹øÈ£ Á¦¸ñ
2,885
input ÀÔ·Â ÇÊµå ¾ÕµÚ °ø¹é ½Ç½Ã°£ Á¦°Å
2,884
Placeholder Æ÷Ä¿½º½Ã °¨Ãß±â
2,883
MySQL Áߺ¹µÈ µ¥ÀÌÅ͸¦ »èÁ¦
2,882
MySQL Áߺ¹ µ¥ÀÌÅÍ È®ÀÎ
2,881
sessionStorage.getItem ¿Í sessionStorage.setItem
2,880
Á¦ÀÌÄõ¸® ·£´ýÀ¸·Î ¹è°æ»ö º¯°æ
2,879
preg match¿¡ °üÇÑ Á¤±Ô½Ä
2,878
Stream an audio file with MediaPlayer ¿Àµð¿À ÆÄÀÏ ½ºÆ®¸®¹Ö Çϱâ
2,877
Audio Streaming PHP Code
2,876
PHP $ SERVER ȯ°æ º¯¼ö Á¤¸®
2,875
Vimeo (ºñ¸Þ¿À) API ¸¦ »ç¿ëÇÏ¿© Ç÷¹À̾î ÄÁÆ®·ÑÇϱâ
2,874
iframe »ç¿ë½Ã ÇÏ´Ü¿¡ ¹ß»ýÇÏ´Â °ø¹é Á¦°Å¹æ¹ý
2,873
¾ÆÀÌÇÁ·¹ÀÓ(iframe) Àüüȭ¸é °¡´ÉÇÏ°Ô Çϱâ
2,872
ºÎÆ®½ºÆ®·¦(bootstrapk)¿¡¼­ »ç¿ëÇÏ´Â class¸í Á¤¸®
2,871
ºÎÆ®½ºÆ®·¦ CSS
2,870
Å©·Ò¿¡¼­ ¸¶Áø Á¶Àý
2,869
PHP ÇöÀç ÆäÀÌÁöÀÇ µµ¸ÞÀθíÀ̳ª urlµîÀÇ Á¤º¸ ¾Ë¾Æ¿À±â
2,868
PHP preg match all()
2,867
PHP ·Î À¥ÆäÀÌÁö ±Ü¾î¿À±â ¸ðµç ¹æ¹ý ÃÑÁ¤¸®!
2,866
[PHP] ¿ø°ÝÁö ÆÄÀÏ ÁÖ¼Ò ³ëÃâ ¾ÈÇÏ°í curl·Î ´Ù¿î·Îµå ¹Þ±â
2,865
PHP ÇÔ¼ö Á¤¸®
2,864
¾ÆÀÌÇÁ·¹ÀÓ(iframe) ºñÀ² À¯ÁöÇϸ鼭 Å©±â Á¶ÀýÇÏ´Â ¹æ¹ý
2,863
PHP ¹è¿­¿¡¼­ ¹«ÀÛÀ§·Î Çϳª »Ì¾ÆÁÖ´Â array rand() ÇÔ¼ö
2,862
PHP Á¤±Ô½Ä Á¤¸®
2,861
PHP Á¤±Ô½ÄÀ» È°¿ëÇÑ ÅÂ±× ¹× ƯÁ¤ ¹®ÀÚ¿­ Á¦°Å ¹× ÃßÃâ ¹æ¹ý
2,860
php Å©·Ñ¸µ ¶Ç´Â ÆÄ½Ì ÇÔ¼ö, Á¤±Ô½Ä ¸ðÀ½
2,859
Á¦ÀÌÄõ¸® ±âº» ¸í·É¾î
2,858
À¥ÆäÀÌÁö °¡·Î ¸ðµå¼¼·Î ¸ðµå ÀνÄÇϱâ
2,857
¸ð¹ÙÀÏ À¥ È­¸é °­Á¦ ȸÀü(°¡·Î¸ðµå °íÁ¤)
2,856
[HTML5]¿¡¼­ frameset ´ëü ¹æ¹ý°ú iframe ¼Ó¼º
¸ñ·Ï
¹ÂÁ÷Æ®·ÎÆ® ºÎ»ê±¤¿ª½Ã ºÎ»êÁø±¸ °¡¾ßµ¿ ¤Ó °³ÀÎÁ¤º¸Ãë±Þ¹æħ
Copyright ¨Ï musictrot All rights reserved.