<?php
class Foo {
function __construct()
{
$this->bar = new Bar($this);
}
function __descruct() {
unset($this->bar);
}
}
class Bar {
function __construct($foo = null)
{
$this->foo = $foo;
}
}
$i = 1;
while ($i++ < 1000) {
$foo = new Foo();
unset($foo);
if ($i > 990) {
echo number_format(memory_get_usage()) . "\n";
}
}
- Output for 7.4.0 - 7.4.1
- 1,220,808
1,221,672
1,222,504
1,223,336
1,224,168
1,225,000
1,225,832
1,226,664
1,227,496
1,228,328
- Output for 7.3.0 - 7.3.13
- 1,220,936
1,221,800
1,222,632
1,223,464
1,224,296
1,225,128
1,225,960
1,226,792
1,227,624
1,228,456
- Output for 7.2.0 - 7.2.26
- 1,217,032
1,217,896
1,218,728
1,219,560
1,220,392
1,221,224
1,222,056
1,222,888
1,223,720
1,224,552
- Output for 7.1.0 - 7.1.33
- 1,180,360
1,181,224
1,182,056
1,182,888
1,183,720
1,184,552
1,185,384
1,186,216
1,187,048
1,187,880
- Output for 7.0.0 - 7.0.33
- 1,180,384
1,181,248
1,182,080
1,182,912
1,183,744
1,184,576
1,185,408
1,186,240
1,187,072
1,187,904
- Output for 5.6.0 - 5.6.40
- 985,352
986,104
986,808
987,512
988,216
988,920
989,624
990,328
991,032
991,736
- Output for 5.5.0 - 5.5.38
- 985,288
986,024
986,728
987,432
988,136
988,840
989,544
990,248
990,952
991,656
- Output for 5.4.0 - 5.4.45
- 985,864
986,600
987,304
988,008
988,712
989,416
990,120
990,824
991,528
992,232
- Output for 5.3.11 - 5.3.29
- 1,389,080
1,389,816
1,390,520
1,391,224
1,391,928
1,392,632
1,393,336
1,394,040
1,394,744
1,395,448
- Output for 5.3.0 - 5.3.10
- 1,388,768
1,389,504
1,390,208
1,390,912
1,391,616
1,392,320
1,393,024
1,393,728
1,394,432
1,395,136
- Output for 5.2.10 - 5.2.17
- 815,408
816,128
816,816
817,504
818,192
818,880
819,568
820,256
820,944
821,632
- Output for 5.2.7 - 5.2.9
- 816,632
817,352
818,040
818,728
819,416
820,104
820,792
821,480
822,168
822,856
- Output for 5.2.3 - 5.2.6
- 816,920
817,640
818,328
819,016
819,704
820,392
821,080
821,768
822,456
823,144
- Output for 5.2.2
- 814,792
815,512
816,200
816,888
817,576
818,264
818,952
819,640
820,328
821,016
- Output for 5.2.1
- 814,856
815,576
816,264
816,952
817,640
818,328
819,016
819,704
820,392
821,080
- 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/WVgY1 on line 24
Process exited with code 255. - Output for 4.4.5 - 4.4.9
- Fatal error: Call to undefined function: memory_get_usage() in /in/WVgY1 on line 24
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/WVgY1 on line 24
Process exited with code 255. - Output for 4.3.0 - 4.3.1
- Fatal error: Call to undefined function: memory_get_usage() in /in/WVgY1 on line 24
preferences:
221.85 ms | 401 KiB | 325 Q