Skip to content

Instantly share code, notes, and snippets.

View korobochkin's full-sized avatar

Kolya Korobochkin korobochkin

View GitHub Profile
@korobochkin
korobochkin / memory.php
Last active August 1, 2016 16:34
A simple example of memory leak in PHP
<?php
class A {
public $b;
function __destruct() {
//echo 'Уничтожается ', __CLASS__, PHP_EOL;
// Looks like no difference between "unset" and "null" method
//$this->b = null;
unset($this->b);
}