~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to Zend/tests/bug32799.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Bug #32799 (crash: calling the corresponding global var during the destruct)
 
3
--FILE--
 
4
<?php
 
5
class test{
 
6
  public $c=1;
 
7
  function __destruct (){
 
8
    $GLOBALS['p']->c++; // no warning
 
9
    print $GLOBALS['p']->c."\n"; // segfault
 
10
        var_dump($GLOBALS['p']);
 
11
  }
 
12
}
 
13
$p=new test;
 
14
$p=null; //destroy the object by a new assignment (segfault)
 
15
?>
 
16
--EXPECT--
 
17
2
 
18
object(test)#1 (1) {
 
19
  ["c"]=>
 
20
  int(2)
 
21
}