xref: /PHP-7.0/Zend/tests/bug40770.phpt (revision 610c7fbe)
1--TEST--
2Bug #40770 (Apache child exits when PHP memory limit reached)
3--INI--
4memory_limit=8M
5--SKIPIF--
6<?php
7$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
8if ($zend_mm_enabled === "0") {
9	die("skip Zend MM disabled");
10}
11?>
12--FILE--
13<?php
14ini_set('display_errors',true);
15$mb=148;
16$var = '';
17for ($i=0; $i<=$mb; $i++) {
18        $var.= str_repeat('a',1*1024*1024);
19}
20?>
21--EXPECTF--
22Fatal error: Allowed memory size of 8388608 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
23