Xdebug __get memory leak

Just spent a few hours trying to work out why some php scripts ended up using more than 300MB of memory when the php.ini memory limit was set to 50MB.

I thought it was a leak in php, after alot of testing I found that in actual fact Xdebug 2.0.0RC4 was causing the leak.

1
2
3
4
5
6
7
8
9
10
class test1 {
    public function __get($name) {
        return;
    }
}
 
$test = new test1();
while(true) {
    $test->test;
}

← Previous Page