<?php
class Foo {
function __construct()
{
$this->bar = new Bar($this);
}
}
class Bar {
function __construct($foo = null)
{
$this->foo = $foo;
}
}
for($i=0;$i<50000;$i++) {
$foo = new Foo();
unset($foo);
if($i % 10000 == 0) {
echo number_format(memory_get_usage()) . "\n";
}
}
- Output for 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
- 389,712
513,456
515,120
516,784
518,448
- Output for 7.2.0 - 7.2.26
- 385,848
508,760
508,760
508,760
508,760
- Output for 7.1.0 - 7.1.33
- 349,176
472,920
472,920
472,920
472,920
- Output for 7.0.0 - 7.0.33
- 349,200
472,944
472,944
472,944
472,944
- Output for 5.6.0 - 5.6.40
- 223,064
1,206,840
1,206,840
1,206,840
1,206,840
- Output for 5.5.0 - 5.5.38
- 223,048
1,206,808
1,206,808
1,206,808
1,206,808
- Output for 5.4.0 - 5.4.45
- 223,552
1,207,312
1,207,312
1,207,312
1,207,312
- Output for 5.3.11 - 5.3.29
- 627,440
1,611,216
1,611,216
1,611,216
1,611,216
- Output for 5.3.0 - 5.3.10
- 627,136
1,610,912
1,610,912
1,610,912
1,610,912
- Output for 5.2.10 - 5.2.17
- 85,352
8,489,320
16,942,472
23,822,736
33,848,728
- Output for 5.2.7 - 5.2.9
- 86,408
8,490,984
16,944,584
23,825,320
33,851,824
- Output for 5.2.6
- 86,728
8,491,488
16,945,104
23,825,856
33,852,360
- Output for 5.2.3 - 5.2.5
- 86,728
8,491,440
16,944,864
23,825,616
33,851,808
- Output for 5.2.2
- 84,624
8,489,392
16,942,728
23,823,504
33,849,696
- Output for 5.2.1
- 84,624
8,489,080
16,942,488
23,823,240
33,849,368
- 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/cZT5S on line 20
Process exited with code 255. - Output for 4.4.5 - 4.4.9
- Fatal error: Call to undefined function: memory_get_usage() in /in/cZT5S on line 20
Process exited with code 255. - Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
- Fatal error: Call to undefined function: memory_get_usage() in /in/cZT5S on line 20
Process exited with code 255. - Output for 4.3.0 - 4.3.1
- Fatal error: Call to undefined function: memory_get_usage() in /in/cZT5S on line 20
preferences:
204.23 ms | 401 KiB | 325 Q