php-src/tests/func/002.phpt
Stig Bakken 315f4f5658 @PHP 3 regression testing framework re-born (Stig)
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.
2000-08-27 19:46:06 +00:00

23 lines
306 B
PHP

--TEST--
Static variables in functions
--POST--
--GET--
--FILE--
<?php
old_function blah (
static $hey=0,$yo=0;
echo "hey=".$hey++.", ",$yo--."\n";
);
blah();
blah();
blah();
if (isset($hey) || isset($yo)) {
echo "Local variables became global :(\n";
}
--EXPECT--
hey=0, 0
hey=1, -1
hey=2, -2