mirror of
https://github.com/php/php-src.git
synced 2026-03-25 08:42:29 +01:00
Turn on gc before we test it
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 004: Simple array cycle
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 005: Simple object cycle
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = new stdClass();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 006: Simple array-object cycle
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = new stdClass();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 007: Unreferensed array cycle
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array(array());
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 008: Unreferensed object cycle
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = new stdClass();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 009: Unreferensed array-object cycle
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 010: Cycle with reference to $GLOBALS
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 011: GC and destructors
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 012: collection of many loops at once
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a=array();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 013: Too many cycles in one array
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 014: Too many cycles in one object
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = new stdClass();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 015: Object as root of cycle
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = new stdClass();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 016: nested GC calls
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 017: GC and destructors with unset
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
class Node {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 018: GC detach with assign
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array(array());
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 019: GC detach with assign by reference
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array(array());
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 020: GC detach reference with assign
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 021: GC detach reference with assign by reference
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
GC 022: GC detach reference in executor's PZVAL_UNLOCK()
|
||||
--INI--
|
||||
error_reporting=0
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array(array());
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 023: Root buffer overflow (automatic collection)
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a=array();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 024: GC and objects with non-standard handlers
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("spl")) print "skip"; ?>
|
||||
--FILE--
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 025: Automatic GC on request shutdown
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array(array());
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 027: GC and properties of internal classes
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
try {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 028: GC and destructors
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 029: GC and destructors
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 030: GC and exceptions in destructors
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
class foo {
|
||||
@@ -28,4 +30,4 @@ Next exception 'Exception' with message 'foobar' in %sgc_030.php:%d
|
||||
Stack trace:
|
||||
#0 %sgc_030.php(%d): foo->__destruct()
|
||||
#1 {main}
|
||||
thrown in %sgc_030.php on line %d
|
||||
thrown in %sgc_030.php on line %d
|
||||
|
||||
Reference in New Issue
Block a user