Skip to content

Commit b70f942

Browse files
committed
Get rid of some yucky past, and reenable these tests
1 parent aac72ce commit b70f942

File tree

3 files changed

+23
-22
lines changed

3 files changed

+23
-22
lines changed

tests/func/002.phpt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
--TEST--
22
Static variables in functions
3-
--SKIPIF--
4-
<?php if(version_compare(zend_version(), "2.0.0-dev", '>=')) echo "skip removed in Zend Engine 2\n"; ?>
53
--FILE--
64
<?php
7-
old_function blah (
5+
function blah()
6+
{
87
static $hey=0,$yo=0;
98

109
echo "hey=".$hey++.", ",$yo--."\n";
11-
);
10+
}
1211

1312
blah();
1413
blah();

tests/func/003.phpt

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
--TEST--
22
General function test
3-
--SKIPIF--
4-
<?php if(version_compare(zend_version(), "2.0.0-dev", '>=')) echo "skip removed in Zend Engine 2\n"; ?>
53
--FILE--
64
<?php
75

8-
old_function a (
6+
function a()
7+
{
98
echo "hey\n";
10-
);
9+
}
1110

1211
function b($i)
1312
{
@@ -34,13 +33,14 @@ c(7,14);
3433
a();
3534

3635

37-
old_function factorial $n (
36+
function factorial($n)
37+
{
3838
if ($n==0 || $n==1) {
3939
return 1;
4040
} else {
4141
return factorial($n-1)*$n;
4242
}
43-
);
43+
}
4444

4545

4646
function factorial2($start, $n)
@@ -63,17 +63,18 @@ for ($k=0; $k<10; $k++) {
6363

6464
echo "and now, from a function...\n";
6565

66-
old_function call_fact (
66+
function call_fact()
67+
{
6768
echo "(it should break at 5...)\n";
6869
for ($i=0; $i<=10; $i++) {
6970
if ($i == 5) break;
7071
$n=factorial($i);
7172
echo "factorial($i) = $n\n";
7273
}
73-
);
74+
}
7475

75-
old_function return4 ( return 4; );
76-
old_function return7 ( return 7; );
76+
function return4() { return 4; }
77+
function return7() { return 7; }
7778

7879
for ($k=0; $k<10; $k++) {
7980
call_fact();
@@ -86,12 +87,13 @@ echo "$result\n";
8687
$result=factorial2(return4(),return7());
8788
echo "$result\n";
8889

89-
old_function andi $i, $j (
90+
function andi($i, $j)
91+
{
9092
for ($k=$i ; $k<=$j ; $k++) {
9193
if ($k >5) continue;
9294
echo "$k\n";
9395
}
94-
);
96+
}
9597

9698
andi (3,10);
9799
--EXPECT--

tests/func/004.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
--TEST--
22
General function test
3-
--SKIPIF--
4-
<?php if(version_compare(zend_version(), "2.0.0-dev", '>=')) echo "skip removed in Zend Engine 2\n"; ?>
53
--FILE--
64
<?php
75

86
echo "Before function declaration...\n";
97

10-
old_function print_something_multiple_times $something,$times (
8+
function print_something_multiple_times($something,$times)
9+
{
1110
echo "----\nIn function, printing the string \"$something\" $times times\n";
1211
for ($i=0; $i<$times; $i++) {
1312
echo "$i) $something\n";
1413
}
1514
echo "Done with function...\n-----\n";
16-
);
15+
}
1716

18-
old_function some_other_function (
17+
function some_other_function()
18+
{
1919
echo "This is some other function, to ensure more than just one function works fine...\n";
20-
);
20+
}
2121

2222

2323
echo "After function declaration...\n";

0 commit comments

Comments
 (0)