diff options
| author | Ant Phillips <ant@php.net> | 2008-11-28 10:41:19 +0000 |
|---|---|---|
| committer | Ant Phillips <ant@php.net> | 2008-11-28 10:41:19 +0000 |
| commit | 775389cd1d0dc08d54c17c6abac7e56d2eef9bcb (patch) | |
| tree | 9c3c406032dbd86f26ce00ecc48c075fa0653d43 /tests/lang/static_basic_002.phpt | |
| parent | ea5dd34c77aad29e783636faaabf6b361059be18 (diff) | |
| download | php-git-775389cd1d0dc08d54c17c6abac7e56d2eef9bcb.tar.gz | |
Language tests: checked on PHP 5.2.6, 5.3 and 6.0 (Windows, Linux and Linux 64 bit).
Diffstat (limited to 'tests/lang/static_basic_002.phpt')
| -rw-r--r-- | tests/lang/static_basic_002.phpt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/lang/static_basic_002.phpt b/tests/lang/static_basic_002.phpt new file mode 100644 index 0000000000..06e2f724ec --- /dev/null +++ b/tests/lang/static_basic_002.phpt @@ -0,0 +1,28 @@ +--TEST-- +Multiple declarations of the same static variable +--FILE-- +<?php + +$a = 5; + +var_dump($a); + +static $a = 10; +static $a = 11; + +var_dump($a); + +function foo() { + static $a = 13; + static $a = 14; + + var_dump($a); +} + +foo(); + +?> +--EXPECT-- +int(5) +int(11) +int(14) |
