This is only a summary. For a full list of changes see the NEWS file.
Feature | RFC / announcement | Author |
---|---|---|
Bundled ZendOptimizer+ as OPcache | https://wiki.php.net/rfc/optimizerplus | zeev |
vendor | |
composer.lock |
<?php | |
$a = 10; | |
if ($a > 5) { | |
$b = 5; | |
} else { | |
$b = 10; | |
} |
GET /products HTTP/1.1 | |
Host: example.com | |
HTTP/1.1 200 Ok | |
Content-Type: text/html;charset=utf-8 | |
<!doctype html> | |
<title>All Products</title> | |
<h1>Products</h1> | |
<ul> | |
<li><a rel="item" href="/products/1">Product 1</a></li> |
<?php | |
namespace Ocramius\CMS\ContentTest; | |
use Ocramius\CMS\ContentTest\Util\ServiceManagerFactory; | |
use Doctrine\ORM\Tools\SchemaTool; | |
use Doctrine\ORM\Tools\SchemaValidator; | |
use PHPUnit_Framework_TestCase; | |
/** |
This is only a summary. For a full list of changes see the NEWS file.
Feature | RFC / announcement | Author |
---|---|---|
Bundled ZendOptimizer+ as OPcache | https://wiki.php.net/rfc/optimizerplus | zeev |
This is just a small post in response to [this tweet][tweet] by Julien Pauli (who by the way is the release manager for PHP 5.5). In the tweet he claims that objects use more memory than arrays in PHP. Even though it can be like that, it's not true in most cases. (Note: This only applies to PHP 5.4 or newer.)
The reason why it's easy to assume that objects are larger than arrays is because objects can be seen as an array of properties and a bit of additional information (like the class it belongs to). And as array + additional info > array
it obviously follows that objects are larger. The thing is that in most cases PHP can optimize the array
part of it away. So how does that work?
The key here is that objects usually have a predefined set of keys, whereas arrays don't:
Apple,
You are a company I learned to love and hate. In that same order.
This playbook has been removed as it is now very outdated. |