問題 php7ってphp5からいろいろ改善されているらしいですけど、何か違うんですか 答え 例えば、多次元配列を用意すると、php5まではやたらとメモリを使っていたが、php7ではメモリ使用量が抑えられ、処理も速くなっている。 <?php ini_set('memory_limit', '1G'); $a = array(); for($i = 0; $i < 50000; $i++){ for($j = 0; $j < 100; $j++){ $a[$i][$j] = ''; } } var_dump(memory_get_usage()); 上の処理をphp5で実行すると # time php test.php int(904399632) real 0m2.959s user 0m2.598s sys 0m0.362s php7で実行すると # time /usr/local/php
![【php】php7の処理がphp5より良くなっているのが確認できる例 at softelメモ](https://cdn-ak-scissors.b.st-hatena.com/image/square/259f6284f52611feb5d369214bb67197662322f2/height=288;version=1;width=512/https%3A%2F%2Fwww.softel.co.jp%2Fblogs%2Ftech%2Fwordpress%2Fwp-content%2Fuploads%2F2014%2F05%2Fphp-logo.png)