diff options
author | Zeev Suraski <zeev@php.net> | 2004-02-11 16:09:46 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2004-02-11 16:09:46 +0000 |
commit | b70f942189126746b4cd9fa5f27c050a277f3086 (patch) | |
tree | 8927965073873d251740fe343aeb1d8c3360135f | |
parent | aac72ce0908ddd400be80c9397c5034ca4199bd4 (diff) | |
download | php-git-b70f942189126746b4cd9fa5f27c050a277f3086.tar.gz |
Get rid of some yucky past, and reenable these tests
-rw-r--r-- | tests/func/002.phpt | 7 | ||||
-rw-r--r-- | tests/func/003.phpt | 26 | ||||
-rw-r--r-- | tests/func/004.phpt | 12 |
3 files changed, 23 insertions, 22 deletions
diff --git a/tests/func/002.phpt b/tests/func/002.phpt index 84e00eeeb5..cb35f92043 100644 --- a/tests/func/002.phpt +++ b/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(); diff --git a/tests/func/003.phpt b/tests/func/003.phpt index 8afaf8a326..d603784076 100644 --- a/tests/func/003.phpt +++ b/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-- diff --git a/tests/func/004.phpt b/tests/func/004.phpt index 7ef452be66..1434297b0d 100644 --- a/tests/func/004.phpt +++ b/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"; |