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

« back to all changes in this revision

Viewing changes to tests/lang/bug17115.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 #17115 (lambda functions produce segfault with static vars)
 
3
--FILE--
 
4
<?php
 
5
$func = create_function('','
 
6
        static $foo = 0;
 
7
        return $foo++;
 
8
');
 
9
var_dump($func());
 
10
var_dump($func());
 
11
var_dump($func());
 
12
?>
 
13
--EXPECT--
 
14
int(0)
 
15
int(1)
 
16
int(2)