1--TEST-- 2Bug #70249 (Segmentation fault while running PHPUnit tests on phpBB 3.2-dev) 3--FILE-- 4<?php 5 6class Logger { 7 public function __construct() { 8 register_shutdown_function(function () { 9 // make regular flush before other shutdown functions, which allows session data collection and so on 10 $this->flush(); 11 // make sure log entries written by shutdown functions are also flushed 12 // ensure "flush()" is called last when there are multiple shutdown functions 13 register_shutdown_function([$this, 'flush'], true); 14 }); 15 } 16 17 public function flush($final = false) { 18 return 1; 19 } 20} 21 22for ($i = 0; $i < 200; $i++) { 23 $a = new Logger(); 24} 25?> 26okey 27--EXPECT-- 28okey 29