From 2022eee2bf3c08f5dc1a1e6aba0988642ca86b75 Mon Sep 17 00:00:00 2001 From: Matthias Glaub Date: Sun, 9 Nov 2014 01:56:20 +0100 Subject: [PATCH 1/2] renaming bytecode to opcode #462 --- _posts/14-02-01-Bytecode-Cache.md | 25 ------------------------- _posts/14-02-01-Opcode-Cache.md | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 25 deletions(-) delete mode 100644 _posts/14-02-01-Bytecode-Cache.md create mode 100644 _posts/14-02-01-Opcode-Cache.md diff --git a/_posts/14-02-01-Bytecode-Cache.md b/_posts/14-02-01-Bytecode-Cache.md deleted file mode 100644 index ff46a22..0000000 --- a/_posts/14-02-01-Bytecode-Cache.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -isChild: true -anchor: bytecode_cache ---- - -## Bytecode Cache {#bytecode_cache_title} - -When a PHP file is executed, under the hood it is first compiled to bytecode (also known as opcode) and, only then, the bytecode is executed. -If a PHP file is not modified, the bytecode will always be the same. This means that the compilation step is a waste of CPU resources. - -This is where Bytecode cache comes in. It prevents redundant compilation by storing bytecode in memory and reusing it on successive calls. -Setting up bytecode cache is a matter of minutes, and your application will speed up significantly. There's really no reason not to use it. - -As of PHP 5.5, there is a built-in bytecode cache called [OPcache][opcache-book]. This is -also available for earlier versions. - -Read more about bytecode caches: - -* [OPcache][opcache-book] (built-in since PHP 5.5) -* [APC](http://php.net/manual/en/book.apc.php) (PHP 5.4 and earlier) -* [XCache](http://xcache.lighttpd.net/) -* [Zend Optimizer+](http://www.zend.com/products/server/) (part of Zend Server package) -* [WinCache](http://www.iis.net/download/wincacheforphp) (extension for MS Windows Server) - -[opcache-book]: http://php.net/manual/en/book.opcache.php \ No newline at end of file diff --git a/_posts/14-02-01-Opcode-Cache.md b/_posts/14-02-01-Opcode-Cache.md new file mode 100644 index 0000000..bac78dc --- /dev/null +++ b/_posts/14-02-01-Opcode-Cache.md @@ -0,0 +1,25 @@ +--- +isChild: true +anchor: opcode_cache +--- + +## Opcode Cache {#opcode_cache_title} + +When a PHP file is executed, under the hood it is first compiled to opcodes and, only then, the opcodes are executed. +If a PHP file is not modified, the opcode will always be the same. This means that the compilation step is a waste of CPU resources. + +This is where opcode caches come in. They prevent redundant compilation by storing opcodes in memory and reusing it on successive calls. +Setting up an opcode cache is a matter of minutes, and your application will speed up significantly. There's really no reason not to use it. + +As of PHP 5.5, there is a built-in opcode cache called [OPcache][opcache-book]. It is also available for earlier versions. + +Read more about opcode caches: + +* [OPcache][opcache-book] (built-in since PHP 5.5) +* [APC](http://php.net/manual/en/book.apc.php) (PHP 5.4 and earlier) +* [XCache](http://xcache.lighttpd.net/) +* [Zend Optimizer+](http://www.zend.com/products/server/) (part of Zend Server package) +* [WinCache](http://www.iis.net/download/wincacheforphp) (extension for MS Windows Server) +* [list of PHP accelerators on Wikipedia](http://en.wikipedia.org/wiki/List_of_PHP_accelerators) + +[opcache-book]: http://php.net/manual/en/book.opcache.php \ No newline at end of file From 662b5db35fc8847ebc31b657a351e13144bf0815 Mon Sep 17 00:00:00 2001 From: Matthias Glaub Date: Sun, 9 Nov 2014 02:09:51 +0100 Subject: [PATCH 2/2] typos --- _posts/14-02-01-Opcode-Cache.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/14-02-01-Opcode-Cache.md b/_posts/14-02-01-Opcode-Cache.md index bac78dc..6a93de5 100644 --- a/_posts/14-02-01-Opcode-Cache.md +++ b/_posts/14-02-01-Opcode-Cache.md @@ -6,10 +6,10 @@ anchor: opcode_cache ## Opcode Cache {#opcode_cache_title} When a PHP file is executed, under the hood it is first compiled to opcodes and, only then, the opcodes are executed. -If a PHP file is not modified, the opcode will always be the same. This means that the compilation step is a waste of CPU resources. +If a PHP file is not modified, the opcodes will always be the same. This means that the compilation step is a waste of CPU resources. This is where opcode caches come in. They prevent redundant compilation by storing opcodes in memory and reusing it on successive calls. -Setting up an opcode cache is a matter of minutes, and your application will speed up significantly. There's really no reason not to use it. +Setting up an opcode cache takes a matter of minutes, and your application will speed up significantly. There's really no reason not to use it. As of PHP 5.5, there is a built-in opcode cache called [OPcache][opcache-book]. It is also available for earlier versions.