mirror of
https://github.com/php/php-src.git
synced 2024-12-04 15:23:44 +08:00
315f4f5658
Took the old PHP 3 regression testing framework and rewrote it in PHP. Should work on both Windows and UNIX, however I have not tested it on Windows. See tests/README for how to write tests. Added the PHP 3 tests and converted most of them.
26 lines
356 B
PHP
26 lines
356 B
PHP
--TEST--
|
|
Function call with global and static variables
|
|
--POST--
|
|
--GET--
|
|
--FILE--
|
|
<?php error_reporting(0);
|
|
$a = 10;
|
|
function Test()
|
|
{
|
|
static $a=1;
|
|
global $b;
|
|
$c = 1;
|
|
$b = 5;
|
|
echo "$a $b ";
|
|
$a++;
|
|
$c++;
|
|
echo "$a $c ";
|
|
}
|
|
Test();
|
|
echo "$a $b $c ";
|
|
Test();
|
|
echo "$a $b $c ";
|
|
Test()?>
|
|
--EXPECT--
|
|
1 5 2 2 10 5 2 5 3 2 10 5 3 5 4 2
|