Skip to content

Instantly share code, notes, and snippets.

@suside
suside / crash.php
Created July 31, 2012 12:46
PHP segfault
<?php
define('OBJECT_COUNT', 20 * 1000);
class Object {
private static $world = array();
private static $maxGuid = 0;
protected $_guid = null;
public function __construct() {
self::$world[$this->_guid = self::$maxGuid++] = $this;
}