Yesterday I found some people on my [favorite reddit][lolphp] wonder about the output of the following code:
<?php
$a = 1;
$c = $a + $a++;| #!/bin/bash | |
| # Install csvkit with csvpys | |
| # (csvpys hasn't been pulled back into the main csvkit repo that you can pip install) | |
| git clone https://github.com/cypreess/csvkit.git | |
| cd csvkit | |
| python setup.py build | |
| sudo python setup.py install | |
| cd ~ |
| My name is Ben Orenstein and I work at thoughtbot in Boston. | |
| Notes will be published. | |
| I'd like to tell you a story. (5:42) | |
| I've never talked about this publicly. | |
| Umass. | |
| Second job. | |
| Version control. | |
| Successful since then. |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" /> | |
| <title>Elasticsearch stats analyzer</title> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
| <script type="text/javascript" src="rules.js"></script> | |
| <script type="text/javascript" src="stats.js"></script> | |
| <script type="text/javascript" src="parser.js"></script> | |
| <script type="text/javascript"> |
| <?php | |
| class PhotoApiTest extends TestCase { | |
| public function setUp() | |
| { | |
| parent::setUp(); | |
| Route::enableFilters(); |
| <?php | |
| /** | |
| * A helper file for Laravel 5, to provide autocomplete information to your IDE | |
| * Generated for Laravel 5.5.13 on 2017-09-28. | |
| * | |
| * @author Barry vd. Heuvel <[email protected]> | |
| * @see https://github.com/barryvdh/laravel-ide-helper | |
| */ | |
| namespace { | |
| exit("This file should not be included, only analyzed by your IDE"); |
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:
| Here is a list of scopes to use in Sublime Text 2 snippets - | |
| ActionScript: source.actionscript.2 | |
| AppleScript: source.applescript | |
| ASP: source.asp | |
| Batch FIle: source.dosbatch | |
| C#: source.cs | |
| C++: source.c++ | |
| Clojure: source.clojure | |
| CoffeeScript: source.coffee |