Last active
December 19, 2015 18:19
-
-
Save dhoko/5998216 to your computer and use it in GitHub Desktop.
Java vs PHP - Op.php
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
<?php | |
/** | |
* PHP 5.3.3-7+squeeze15 | |
* php op.php | |
*/ | |
class Op | |
{ | |
private $lang = ''; | |
private $id = null; | |
function __construct() | |
{ | |
$this->id = 5; | |
$this->lang = ''; | |
} | |
public static function main() { | |
$stack = array(); | |
$howMuch = 0; | |
while(1) { | |
echo 'create : ',$howMuch, 'OpObject', "\n"; | |
for ($i=0; $i < 1000; $i++) { | |
$stack[] = new Op(); | |
$howMuch++; | |
} | |
if($howMuch === 8000000) exit(2); | |
} | |
} | |
} | |
Op::main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Testé sous 5.4 ce matin ;)
Il plante à 2 millions