Created
March 10, 2015 20:59
-
-
Save ckwalsh/2cee4e3d966d47b6cb4c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ckwalsh@ckwalsh:~$ cat a.php | |
<?php | |
class FooBar { | |
public static function run() { | |
$start = memory_get_usage(true); | |
$j = 500000; | |
for ($i = 0; $i < $j; $i++) { | |
$Store[] = array($i, rand(0,50000000)); | |
} | |
var_dump(memory_get_usage(true) - $start); | |
} | |
} | |
FooBar::run(); | |
ckwalsh@ckwalsh:~$ php a.php | |
int(292552704) | |
ckwalsh@ckwalsh:~$ hhvm a.php | |
int(36587312) | |
ckwalsh@ckwalsh:~$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment