@ 2014-11-02T19:28:57Z <?php
#gc_disable();
class x {
private $value;
private $y;
public function __construct($value) {
$this->value = $value;
$this->y = new y();
}
}
class y {
}
$array = array();
$objects = array();
for($i = 0; $i < 50000; $i++) {
$value = md5('Hallo');
$objects[] = new x($value);
$array[] = $value;
}
var_dump(number_format(memory_get_usage(), 0, ',', '.')) . "\n";
var_dump(number_format(memory_get_usage(true), 0,',','.')) . "\n";
unset($array);
unset($objects);
unset($value);
var_dump(number_format(memory_get_usage(), 0, ',', '.')) . "\n";
var_dump(number_format(memory_get_usage(true), 0,',','.')) . "\n";
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.4.0 - 7.4.1 string(10) "14.835.096"
string(10) "16.785.408"
string(9) "1.432.472"
string(10) "12.582.912"
Output for 7.3.0 - 7.3.13 string(10) "14.835.088"
string(10) "16.785.408"
string(9) "1.432.464"
string(10) "12.582.912"
Output for 7.2.0 - 7.2.26 string(10) "14.830.408"
string(10) "16.785.408"
string(9) "1.427.784"
string(10) "12.582.912"
Output for 7.1.0 - 7.1.33 string(10) "14.793.896"
string(10) "16.785.408"
string(9) "1.391.272"
string(10) "12.582.912"
Output for 7.0.0 - 7.0.33 string(10) "14.793.944"
string(10) "16.785.408"
string(9) "1.391.320"
string(10) "12.582.912"
Output for 5.6.0 - 5.6.40 string(10) "34.797.944"
string(10) "35.651.584"
string(9) "8.548.648"
string(10) "21.233.664"
Output for 5.5.0 - 5.5.38 string(10) "34.797.944"
string(10) "35.651.584"
string(9) "8.548.616"
string(10) "21.233.664"
Output for 5.4.10 - 5.4.45 string(10) "34.798.512"
string(10) "35.651.584"
string(9) "8.549.128"
string(10) "20.971.520"
Output for 5.4.0 - 5.4.9 string(10) "34.798.512"
string(10) "35.651.584"
string(9) "8.549.112"
string(10) "20.971.520"
Output for 5.3.11 - 5.3.29 string(10) "59.206.832"
string(10) "60.030.976"
string(9) "8.955.768"
string(10) "13.893.632"
Output for 5.3.0 - 5.3.10 string(10) "59.206.504"
string(10) "60.030.976"
string(9) "8.955.464"
string(10) "13.107.200"
Output for 5.2.10 - 5.2.17 string(10) "55.382.288"
string(10) "56.360.960"
string(9) "6.332.968"
string(9) "8.650.752"
Output for 5.2.7 - 5.2.9 string(10) "55.385.192"
string(10) "56.360.960"
string(9) "6.464.128"
string(9) "8.912.896"
Output for 5.2.6 string(10) "55.385.480"
string(10) "56.360.960"
string(9) "6.464.408"
string(9) "8.650.752"
Output for 5.2.3 - 5.2.5 string(10) "55.385.592"
string(10) "55.574.528"
string(9) "6.464.416"
string(10) "10.747.904"
Output for 5.2.2 string(10) "55.383.472"
string(10) "55.574.528"
string(9) "6.462.376"
string(10) "12.058.624"
Output for 5.2.1 string(10) "55.382.336"
string(10) "55.574.528"
string(9) "6.364.048"
string(9) "8.126.464"
Output for 5.0.0 - 5.0.5 , 5.1.0 - 5.1.6 , 5.2.0 Fatal error: Call to undefined function memory_get_usage() in /in/cf4GC on line 26
Process exited with code 255 . Output for 4.4.2 - 4.4.9 Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/cf4GC on line 5
Process exited with code 255 . Output for 4.3.0 - 4.3.1 , 4.3.5 - 4.3.11 , 4.4.0 - 4.4.1 Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/cf4GC on line 5
Process exited with code 255 . Output for 4.3.2 - 4.3.4 Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/cf4GC on line 5
Process exited with code 255 . preferences:dark mode live preview
191 ms | 401 KiB | 325 Q