Skip to content
Browse files

Get rid of some yucky past, and reenable these tests

  • Loading branch information...
1 parent aac72ce commit b70f942189126746b4cd9fa5f27c050a277f3086 @zsuraski zsuraski committed Feb 11, 2004
Showing with 23 additions and 22 deletions.
  1. +3 −4 tests/func/002.phpt
  2. +14 −12 tests/func/003.phpt
  3. +6 −6 tests/func/004.phpt
View
7 tests/func/002.phpt
@@ -1,14 +1,13 @@
--TEST--
Static variables in functions
---SKIPIF--
-<?php if(version_compare(zend_version(), "2.0.0-dev", '>=')) echo "skip removed in Zend Engine 2\n"; ?>
--FILE--
<?php
-old_function blah (
+function blah()
+{
static $hey=0,$yo=0;
echo "hey=".$hey++.", ",$yo--."\n";
-);
+}
blah();
blah();
View
26 tests/func/003.phpt
@@ -1,13 +1,12 @@
--TEST--
General function test
---SKIPIF--
-<?php if(version_compare(zend_version(), "2.0.0-dev", '>=')) echo "skip removed in Zend Engine 2\n"; ?>
--FILE--
<?php
-old_function a (
+function a()
+{
echo "hey\n";
-);
+}
function b($i)
{
@@ -34,13 +33,14 @@ c(7,14);
a();
-old_function factorial $n (
+function factorial($n)
+{
if ($n==0 || $n==1) {
return 1;
} else {
return factorial($n-1)*$n;
}
-);
+}
function factorial2($start, $n)
@@ -63,17 +63,18 @@ for ($k=0; $k<10; $k++) {
echo "and now, from a function...\n";
-old_function call_fact (
+function call_fact()
+{
echo "(it should break at 5...)\n";
for ($i=0; $i<=10; $i++) {
if ($i == 5) break;
$n=factorial($i);
echo "factorial($i) = $n\n";
}
-);
+}
-old_function return4 ( return 4; );
-old_function return7 ( return 7; );
+function return4() { return 4; }
+function return7() { return 7; }
for ($k=0; $k<10; $k++) {
call_fact();
@@ -86,12 +87,13 @@ echo "$result\n";
$result=factorial2(return4(),return7());
echo "$result\n";
-old_function andi $i, $j (
+function andi($i, $j)
+{
for ($k=$i ; $k<=$j ; $k++) {
if ($k >5) continue;
echo "$k\n";
}
-);
+}
andi (3,10);
--EXPECT--
View
12 tests/func/004.phpt
@@ -1,23 +1,23 @@
--TEST--
General function test
---SKIPIF--
-<?php if(version_compare(zend_version(), "2.0.0-dev", '>=')) echo "skip removed in Zend Engine 2\n"; ?>
--FILE--
<?php
echo "Before function declaration...\n";
-old_function print_something_multiple_times $something,$times (
+function print_something_multiple_times($something,$times)
+{
echo "----\nIn function, printing the string \"$something\" $times times\n";
for ($i=0; $i<$times; $i++) {
echo "$i) $something\n";
}
echo "Done with function...\n-----\n";
-);
+}
-old_function some_other_function (
+function some_other_function()
+{
echo "This is some other function, to ensure more than just one function works fine...\n";
-);
+}
echo "After function declaration...\n";

0 comments on commit b70f942

Please sign in to comment.
Something went wrong with that request. Please try again.