diff options
author | Stig Bakken <ssb@php.net> | 2000-08-27 19:46:06 +0000 |
---|---|---|
committer | Stig Bakken <ssb@php.net> | 2000-08-27 19:46:06 +0000 |
commit | 315f4f5658cf22a17ba06fa2ca2f3d890355873f (patch) | |
tree | 3dd1134c1d1c3821b48fab806884123f09b2d21f | |
parent | 7eeda99a055df5a510d3d20526e9adcb42fecdb0 (diff) | |
download | php-git-315f4f5658cf22a17ba06fa2ca2f3d890355873f.tar.gz |
@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.
111 files changed, 18904 insertions, 74 deletions
diff --git a/ext/db/tests/001.phpt b/ext/db/tests/001.phpt new file mode 100644 index 0000000000..9792bfef35 --- /dev/null +++ b/ext/db/tests/001.phpt @@ -0,0 +1,11 @@ +--TEST-- +DBM File Creation Test +--POST-- +--GET-- +--FILE-- +<?php + dbmopen("./test.dbm","n"); + dbmclose("./test.dbm"); +?> +--EXPECT-- + diff --git a/ext/db/tests/002.phpt b/ext/db/tests/002.phpt new file mode 100644 index 0000000000..99e66e9568 --- /dev/null +++ b/ext/db/tests/002.phpt @@ -0,0 +1,14 @@ +--TEST-- +DBM Insert/Fetch Test +--POST-- +--GET-- +--FILE-- +<?php + dbmopen("./test.dbm","n"); + dbminsert("./test.dbm","key1","This is a test insert"); + $a = dbmfetch("./test.dbm","key1"); + dbmclose("./test.dbm"); + echo $a +?> +--EXPECT-- +This is a test insert diff --git a/ext/db/tests/003.phpt b/ext/db/tests/003.phpt new file mode 100644 index 0000000000..ec639a02a7 --- /dev/null +++ b/ext/db/tests/003.phpt @@ -0,0 +1,15 @@ +--TEST-- +DBM Insert/Replace/Fetch Test +--POST-- +--GET-- +--FILE-- +<?php + dbmopen("./test.dbm","n"); + dbminsert("./test.dbm","key1","This is a test insert"); + dbmreplace("./test.dbm","key1","This is the replacement text"); + $a = dbmfetch("./test.dbm","key1"); + dbmclose("./test.dbm"); + echo $a +?> +--EXPECT-- +This is the replacement text diff --git a/ext/db/tests/004.phpt b/ext/db/tests/004.phpt new file mode 100644 index 0000000000..561bd0be63 --- /dev/null +++ b/ext/db/tests/004.phpt @@ -0,0 +1,19 @@ +--TEST-- +DBM Multiple Insert/Fetch Test +--POST-- +--GET-- +--FILE-- +<?php + dbmopen("./test.dbm","n"); + dbminsert("./test.dbm","key1","Content String 1"); + dbminsert("./test.dbm","key2","Content String 2"); + dbminsert("./test.dbm","key3","Third Content String"); + dbminsert("./test.dbm","key4","Another Content String"); + dbminsert("./test.dbm","key5","The last content string"); + $a = dbmfetch("./test.dbm","key4"); + $b = dbmfetch("./test.dbm","key2"); + dbmclose("./test.dbm"); + echo "$a $b"; +?> +--EXPECT-- +Another Content String Content String 2 diff --git a/ext/db/tests/005.phpt b/ext/db/tests/005.phpt new file mode 100644 index 0000000000..90ca126272 --- /dev/null +++ b/ext/db/tests/005.phpt @@ -0,0 +1,23 @@ +--TEST-- +DBM FirstKey/NextKey Loop Test With 5 Items +--POST-- +--GET-- +--FILE-- +<?php + dbmopen("./test.dbm","n"); + dbminsert("./test.dbm","key1","Content String 1"); + dbminsert("./test.dbm","key2","Content String 2"); + dbminsert("./test.dbm","key3","Third Content String"); + dbminsert("./test.dbm","key4","Another Content String"); + dbminsert("./test.dbm","key5","The last content string"); + $a = dbmfirstkey("./test.dbm"); + $i=0; + while($a) { + $a = dbmnextkey("./test.dbm",$a); + $i++; + } + dbmclose("./test.dbm"); + echo $i +?> +--EXPECT-- +5 diff --git a/ext/db/tests/006.phpt b/ext/db/tests/006.phpt new file mode 100644 index 0000000000..3654095a59 --- /dev/null +++ b/ext/db/tests/006.phpt @@ -0,0 +1,25 @@ +--TEST-- +DBM FirstKey/NextKey with 2 deletes +--POST-- +--GET-- +--FILE-- +<?php + dbmopen("./test.dbm","n"); + dbminsert("./test.dbm","key1","Content String 1"); + dbminsert("./test.dbm","key2","Content String 2"); + dbminsert("./test.dbm","key3","Third Content String"); + dbminsert("./test.dbm","key4","Another Content String"); + dbminsert("./test.dbm","key5","The last content string"); + dbmdelete("./test.dbm","key3"); + dbmdelete("./test.dbm","key1"); + $a = dbmfirstkey("./test.dbm"); + $i=0; + while($a) { + $a = dbmnextkey("./test.dbm",$a); + $i++; + } + dbmclose("./test.dbm"); + echo $i +?> +--EXPECT-- +3 diff --git a/ext/ereg/tests/001.phpt b/ext/ereg/tests/001.phpt new file mode 100644 index 0000000000..f63c252518 --- /dev/null +++ b/ext/ereg/tests/001.phpt @@ -0,0 +1,9 @@ +--TEST-- +RegReplace test 1 +--POST-- +--GET-- +--FILE-- +<?php $a="abc123"; + echo ereg_replace("123","def",$a)?> +--EXPECT-- +abcdef diff --git a/ext/ereg/tests/002.phpt b/ext/ereg/tests/002.phpt new file mode 100644 index 0000000000..a9b7aaa00a --- /dev/null +++ b/ext/ereg/tests/002.phpt @@ -0,0 +1,9 @@ +--TEST-- +RegReplace test 2 +--POST-- +--GET-- +--FILE-- +<?php $a="abc123"; + echo ereg_replace("123","",$a)?> +--EXPECT-- +abc diff --git a/ext/ereg/tests/003.phpt b/ext/ereg/tests/003.phpt new file mode 100644 index 0000000000..bb42729ca2 --- /dev/null +++ b/ext/ereg/tests/003.phpt @@ -0,0 +1,11 @@ +--TEST-- +ereg_replace single-quote test +--POST-- +--GET-- +--FILE-- +<?php $a="\\'test"; + echo ereg_replace("\\\\'","'",$a) +?> +--EXPECT-- + +'test diff --git a/ext/ereg/tests/004.phpt b/ext/ereg/tests/004.phpt new file mode 100644 index 0000000000..1f60ff4900 --- /dev/null +++ b/ext/ereg/tests/004.phpt @@ -0,0 +1,16 @@ +--TEST-- +simple ereg test +--POST-- +--GET-- +--FILE-- +<?php $a="This is a nice and simple string"; + if (ereg(".*nice and simple.*",$a)) { + echo "ok\n"; + } + if (!ereg(".*doesn't exist.*",$a)) { + echo "ok\n"; + } +?> +--EXPECT-- +ok +ok diff --git a/ext/ereg/tests/005.phpt b/ext/ereg/tests/005.phpt new file mode 100644 index 0000000000..78c0a0912a --- /dev/null +++ b/ext/ereg/tests/005.phpt @@ -0,0 +1,20 @@ +--TEST-- +Test Regular expression register support in ereg +--POST-- +--GET-- +--FILE-- +<?php $a="This is a nice and simple string"; + echo ereg(".*(is).*(is).*",$a,$registers); + echo "\n"; + echo $registers[0]; + echo "\n"; + echo $registers[1]; + echo "\n"; + echo $registers[2]; + echo "\n"; +?> +--EXPECT-- +32 +This is a nice and simple string +is +is diff --git a/ext/ereg/tests/006.phpt b/ext/ereg/tests/006.phpt new file mode 100644 index 0000000000..50b6dbfd3a --- /dev/null +++ b/ext/ereg/tests/006.phpt @@ -0,0 +1,10 @@ +--TEST-- +Test ereg_replace of start-of-line +--POST-- +--GET-- +--FILE-- +<?php $a="This is a nice and simple string"; + echo ereg_replace("^This","That",$a); +?> +--EXPECT-- +That is a nice and simple string diff --git a/ext/ereg/tests/007.phpt b/ext/ereg/tests/007.phpt new file mode 100644 index 0000000000..2223d48e22 --- /dev/null +++ b/ext/ereg/tests/007.phpt @@ -0,0 +1,12 @@ +--TEST-- +Test empty result buffer in reg_replace +--POST-- +--GET-- +--FILE-- +<?php + $a="abcd"; + $b=ereg_replace("abcd","",$a); + echo strlen($b); +?> +--EXPECT-- +0 diff --git a/ext/ereg/tests/008.phpt b/ext/ereg/tests/008.phpt new file mode 100644 index 0000000000..db61d1ca07 --- /dev/null +++ b/ext/ereg/tests/008.phpt @@ -0,0 +1,10 @@ +--TEST-- +Test back-references in regular expressions +--POST-- +--GET-- +--FILE-- +<?php + echo ereg_replace("([a-z]*)([-=+|]*)([0-9]+)","\\3 \\1 \\2\n","abc+-|=123"); +?> +--EXPECT-- +123 abc +-|= diff --git a/ext/ereg/tests/009.phpt b/ext/ereg/tests/009.phpt new file mode 100644 index 0000000000..4996ef4c97 --- /dev/null +++ b/ext/ereg/tests/009.phpt @@ -0,0 +1,19 @@ +--TEST-- +Test split() +--POST-- +--GET-- +--FILE-- +<?php + $a=split("[[:space:]]","this is a +test"); + echo count($a) . "\n"; + for ($i = 0; $i < count($a); $i++) { + echo $a[$i] . "\n"; + } +?> +--EXPECT-- +4 +this +is +a +test diff --git a/ext/ereg/tests/010.phpt b/ext/ereg/tests/010.phpt new file mode 100644 index 0000000000..30d28fd02f --- /dev/null +++ b/ext/ereg/tests/010.phpt @@ -0,0 +1,9 @@ +--TEST-- +Long back references +--POST-- +--GET-- +--FILE-- +<?php $a="abc122222222223"; + echo ereg_replace("1(2*)3","\\1def\\1",$a)?> +--EXPECT-- +abc2222222222def2222222222 diff --git a/ext/ereg/tests/011.phpt b/ext/ereg/tests/011.phpt new file mode 100644 index 0000000000..4eda774f58 --- /dev/null +++ b/ext/ereg/tests/011.phpt @@ -0,0 +1,9 @@ +--TEST-- +\0 back reference +--POST-- +--GET-- +--FILE-- +<?php $a="abc123"; + echo ereg_replace("123","def\\0ghi",$a)?> +--EXPECT-- +abcdef123ghi diff --git a/ext/ereg/tests/012.phpt b/ext/ereg/tests/012.phpt new file mode 100644 index 0000000000..d5342c7436 --- /dev/null +++ b/ext/ereg/tests/012.phpt @@ -0,0 +1,9 @@ +--TEST-- +nonexisting back reference +--POST-- +--GET-- +--FILE-- +<?php $a="abc123"; + echo ereg_replace("123",'def\1ghi',$a)?> +--EXPECT-- +abcdef\1ghi diff --git a/ext/ereg/tests/013.phpt b/ext/ereg/tests/013.phpt new file mode 100644 index 0000000000..ec3329fa7c --- /dev/null +++ b/ext/ereg/tests/013.phpt @@ -0,0 +1,9 @@ +--TEST-- +escapes in replace string +--POST-- +--GET-- +--FILE-- +<?php $a="abc123"; + echo ereg_replace("123","def\\g\\\\hi\\",$a)?> +--EXPECT-- +abcdef\g\\hi\ diff --git a/ext/ereg/tests/014.phpt b/ext/ereg/tests/014.phpt new file mode 100644 index 0000000000..ec4d19ed0e --- /dev/null +++ b/ext/ereg/tests/014.phpt @@ -0,0 +1,9 @@ +--TEST-- +backreferences not replaced recursively +--POST-- +--GET-- +--FILE-- +<?php $a="a\\2bxc"; + echo ereg_replace("a(.*)b(.*)c","\\1",$a)?> +--EXPECT-- +\2 diff --git a/ext/ereg/tests/015.phpt b/ext/ereg/tests/015.phpt new file mode 100644 index 0000000000..961a60fa76 --- /dev/null +++ b/ext/ereg/tests/015.phpt @@ -0,0 +1,8 @@ +--TEST-- +replace empty matches +--POST-- +--GET-- +--FILE-- +<?php echo ereg_replace("^","z","abc123")?> +--EXPECT-- +zabc123 diff --git a/ext/ereg/tests/016.phpt b/ext/ereg/tests/016.phpt new file mode 100644 index 0000000000..a24816f182 --- /dev/null +++ b/ext/ereg/tests/016.phpt @@ -0,0 +1,8 @@ +--TEST-- +test backslash handling in regular expressions +--POST-- +--GET-- +--FILE-- +<?php echo ereg_replace('\?',"abc","?123?")?> +--EXPECT-- +abc123abc diff --git a/ext/interbase/tests/001.phpt b/ext/interbase/tests/001.phpt new file mode 100644 index 0000000000..79263d6f5c --- /dev/null +++ b/ext/interbase/tests/001.phpt @@ -0,0 +1,34 @@ +--TEST-- +InterBase: create test database +--SKIPIF-- +<?php if (!extension_loaded("interbase")) print "skip"; ?> +--POST-- +--GET-- +--FILE-- +<? +/* $Id$ */ + + $test_base = "ibase_test.tmp"; + $name = tempnam("","CREATEDB"); + $ftmp = fopen($name,"w"); + if (is_file($test_base)) + fwrite($ftmp, + "connect \"$test_base\"; + drop database;\n" + ); + fwrite($ftmp, + "create database \"$test_base\"; + create table test1 ( + i integer, + c varchar(100) + ); + commit; + insert into test1(i, c) values(1, 'test table created with isql'); + exit;\n" + ); + fclose($ftmp); + exec("isql -i $name 2>&1"); + unlink($name); +?> +--EXPECT-- + diff --git a/ext/interbase/tests/002.phpt b/ext/interbase/tests/002.phpt new file mode 100644 index 0000000000..6ea1b498ba --- /dev/null +++ b/ext/interbase/tests/002.phpt @@ -0,0 +1,35 @@ +--TEST-- +InterBase: connect, close and pconnect +--SKIPIF-- +<?php if (!extension_loaded("interbase")) print "skip"; ?> +--POST-- +--GET-- +--FILE-- +<? +/* $Id$ */ + + require("interbase/interbase.inc"); + + $test_base = "ibase_test.tmp"; + + ibase_connect($test_base); + out_table("test1"); + ibase_close(); + + $con = ibase_connect($test_base); + $pcon1 = ibase_pconnect($test_base); + $pcon2 = ibase_pconnect($test_base); + ibase_close($con); + ibase_close($pcon1); + + out_table("test1"); + + ibase_close($pcon2); +?> +--EXPECT-- +--- test1 --- +1 test table created with isql +--- +--- test1 --- +1 test table created with isql +--- diff --git a/ext/interbase/tests/003.phpt b/ext/interbase/tests/003.phpt new file mode 100644 index 0000000000..5398b52850 --- /dev/null +++ b/ext/interbase/tests/003.phpt @@ -0,0 +1,93 @@ +--TEST-- +InterBase: misc sql types (may take a while) +--SKIPIF-- +<?php if (!extension_loaded("interbase")) print "skip"; ?> +--POST-- +--GET-- +--FILE-- +<? +/* $Id$ */ + + require("interbase/interbase.inc"); + + $test_base = "ibase_test.tmp"; + + ibase_connect($test_base); + + ibase_query( + "create table test3 ( + iter integer, + v_char char(1000), + v_date date, + v_decimal decimal(12,3), + v_double double precision, + v_float float, + v_integer integer, + v_numeric numeric(4,2), + v_smallint smallint, + v_varchar varchar(10000) + )"); + ibase_commit(); + + /* if timefmt is not supported, suppress error here*/ + @ibase_timefmt("%m/%d/%Y %H:%M:%S"); + + for($iter = 0; $iter < 10; $iter++){ + /* prepare data */ + $v_char = rand_str(1000); + $v_date = rand_datetime(); + $v_decimal = rand_number(12,3); + $v_double = rand_number(20); + $v_float = rand_number(7); + $v_integer = rand_number(9,0); + $v_numeric = rand_number(4,2); + $v_smallint = rand_number(5) % 32767; + $v_varchar = rand_str(10000); + + ibase_query( + "insert into test3 (iter, v_char,v_date,v_decimal,v_double,v_float,v_integer,v_numeric,v_smallint,v_varchar) + values ($iter, '$v_char','$v_date',$v_decimal,$v_double,$v_float,$v_integer,$v_numeric,$v_smallint,'$v_varchar')"); + $sel = ibase_query("select * from test3 where iter = $iter"); + + $row = ibase_fetch_object($sel); + if(substr($row->V_CHAR,0,strlen($v_char)) != $v_char){ + echo " CHAR fail:\n"; + echo " in: $v_char\n"; + echo " out: $row->V_CHAR\n"; + } + if($row->V_DATE != $v_date){ + echo " DATE fail\n"; + echo " in: $v_date\n"; + echo " out: $row->V_DATE\n"; + } + if($row->V_DECIMAL != $v_decimal){ + echo " DECIMAL fail\n"; + echo " in: $v_decimal\n"; + echo " out: $row->V_DECIMAL\n"; + } + if(abs($row->V_DOUBLE - $v_double) > abs($v_double / 1E15)){ + echo " DOUBLE fail\n"; + echo " in: $v_double\n"; + echo " out: $row->V_DOUBLE\n"; + } + if(abs($row->V_FLOAT - $v_float) > abs($v_float / 1E7)){ + echo " FLOAT fail\n"; + echo " in: $v_float\n"; + echo " out: $row->V_FLOAT\n"; + } + if($row->V_INTEGER != $v_integer){ + echo " INTEGER fail\n"; + echo " in: $v_integer\n"; + echo " out: $row->V_INTEGER\n"; + } + ibase_free_result($sel); + }/* for($iter)*/ + + ibase_close(); + echo "end of test\n"; +?> +--EXPECT-- + +end of test + + diff --git a/ext/interbase/tests/004.phpt b/ext/interbase/tests/004.phpt new file mode 100644 index 0000000000..04df7ae991 --- /dev/null +++ b/ext/interbase/tests/004.phpt @@ -0,0 +1,179 @@ +--TEST-- +InterBase: BLOB test +--SKIPIF-- +<?php if (!extension_loaded("interbase")) print "skip"; ?> +--POST-- +--GET-- +--FILE-- +<? +/* $Id$ */ + + require("interbase/interbase.inc"); + + $test_base = "ibase_test.tmp"; + + ibase_connect($test_base); + + ibase_query( + "create table test4 ( + v_integer integer, + v_blob blob)"); + ibase_commit(); + + /* create 10k blob file */ + $blob_str = rand_binstr(10*1024); + + $name = tempnam("","blob.tmp"); + $name = "blob.tmp"; + $ftmp = fopen($name,"w"); + fwrite($ftmp,$blob_str); + fclose($ftmp); + + echo "import blob 1\n"; + $ftmp = fopen($name,"r"); + $bl_s = ibase_blob_import($ftmp); + ibase_query("insert into test4 (v_integer, v_blob) values (1, ?)", $bl_s); + + echo "test blob 1\n"; + $q = ibase_query("select v_blob from test4 where v_integer = 1"); + $row = ibase_fetch_object($q); + $bl_h = ibase_blob_open($row->V_BLOB); + + while($piece = ibase_blob_get($bl_h, rand() % 1024)) + $blob .= $piece; + if($blob != $blob_str) + echo " BLOB 1 fail\n"; + ibase_blob_close($bl_h); + ibase_free_result($q); + unset($blob); + + echo "create blob 2\n"; + + $bl_h = ibase_blob_create(); + $ftmp = fopen($name,"r"); + while($piece = fread($ftmp, rand() % 1024)){ + ibase_blob_add($bl_h, $piece); + } + fclose($ftmp); + $bl_s = ibase_blob_close($bl_h); + ibase_query("insert into test4 (v_integer, v_blob) values (2, ?)", $bl_s); + + echo "test blob 2\n"; + + $q = ibase_query("select v_blob from test4 where v_integer = 2"); + $row = ibase_fetch_object($q); + $bl_h = ibase_blob_open($row->V_BLOB); + while($piece = ibase_blob_get($bl_h, rand() % 1024)) + $blob .= $piece; + if($blob != $blob_str) + echo " BLOB 2 fail\n"; + ibase_blob_close($bl_h); + ibase_free_result($q); + unset($blob); + + + echo "create blob 3\n"; + + $bl_h = ibase_blob_create(); + + ibase_blob_add($bl_h, "+----------------------------------------------------------------------+\n"); + ibase_blob_add($bl_h, "| PHP HTML Embedded Scripting Language Version 3.0 |\n"); + ibase_blob_add($bl_h, "+----------------------------------------------------------------------+\n"); + ibase_blob_add($bl_h, "| Copyright (c) 1997-2000 PHP Development Team (See Credits file) |\n"); + ibase_blob_add($bl_h, "+----------------------------------------------------------------------+\n"); + ibase_blob_add($bl_h, "| This program is free software; you can redistribute it and/or modify |\n"); + ibase_blob_add($bl_h, "| it under the terms of one of the following licenses: |\n"); + ibase_blob_add($bl_h, "| |\n"); + ibase_blob_add($bl_h, "| A) the GNU General Public License as published by the Free Software |\n"); + ibase_blob_add($bl_h, "| Foundation; either version 2 of the License, or (at your option) |\n"); + ibase_blob_add($bl_h, "| any later version. |\n"); + ibase_blob_add($bl_h, "| |\n"); + ibase_blob_add($bl_h, "| B) the PHP License as published by the PHP Development Team and |\n"); + ibase_blob_add($bl_h, "| included in the distribution in the file: LICENSE |\n"); + ibase_blob_add($bl_h, "| |\n"); + ibase_blob_add($bl_h, "| This program is distributed in the hope that it will be useful, |\n"); + ibase_blob_add($bl_h, "| but WITHOUT ANY WARRANTY; without even the implied warranty of |\n"); + ibase_blob_add($bl_h, "| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |\n"); + ibase_blob_add($bl_h, "| GNU General Public License for more details. |\n"); + ibase_blob_add($bl_h, "| |\n"); + ibase_blob_add($bl_h, "| You should have received a copy of both licenses referred to here. |\n"); + ibase_blob_add($bl_h, "| If you did not, or have any questions about PHP licensing, please |\n"); + ibase_blob_add($bl_h, "| contact core@php.net. |\n"); + ibase_blob_add($bl_h, "+----------------------------------------------------------------------+\n"); + $bl_s = ibase_blob_close($bl_h); + ibase_query("insert into test4 (v_integer, v_blob) values (3, ?)", $bl_s); + + echo "echo blob 3\n"; + + $q = ibase_query("select v_blob from test4 where v_integer = 3"); + $row = ibase_fetch_object($q); + ibase_blob_echo($row->V_BLOB); + ibase_free_result($q); + + echo "fetch blob 3\n"; + $q = ibase_query("select v_blob from test4 where v_integer = 3"); + $row = ibase_fetch_object($q,IBASE_TEXT); + echo $row->V_BLOB; + ibase_free_result($q); + + ibase_close(); + unlink($name); + echo "end of test\n"; +?> +--EXPECT-- +import blob 1 +test blob 1 +create blob 2 +test blob 2 +create blob 3 +echo blob 3 ++----------------------------------------------------------------------+ +| PHP HTML Embedded Scripting Language Version 3.0 | ++----------------------------------------------------------------------+ +| Copyright (c) 1997-2000 PHP Development Team (See Credits file) | ++----------------------------------------------------------------------+ +| This program is free software; you can redistribute it and/or modify | +| it under the terms of one of the following licenses: | +| | +| A) the GNU General Public License as published by the Free Software | +| Foundation; either version 2 of the License, or (at your option) | +| any later version. | +| | +| B) the PHP License as published by the PHP Development Team and | +| included in the distribution in the file: LICENSE | +| | +| This program is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +| GNU General Public License for more details. | +| | +| You should have received a copy of both licenses referred to here. | +| If you did not, or have any questions about PHP licensing, please | +| contact core@php.net. | ++----------------------------------------------------------------------+ +fetch blob 3 ++----------------------------------------------------------------------+ +| PHP HTML Embedded Scripting Language Version 3.0 | ++----------------------------------------------------------------------+ +| Copyright (c) 1997-2000 PHP Development Team (See Credits file) | ++----------------------------------------------------------------------+ +| This program is free software; you can redistribute it and/or modify | +| it under the terms of one of the following licenses: | +| | +| A) the GNU General Public License as published by the Free Software | +| Foundation; either version 2 of the License, or (at your option) | +| any later version. | +| | +| B) the PHP License as published by the PHP Development Team and | +| included in the distribution in the file: LICENSE | +| | +| This program is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +| GNU General Public License for more details. | +| | +| You should have received a copy of both licenses referred to here. | +| If you did not, or have any questions about PHP licensing, please | +| contact core@php.net. | ++----------------------------------------------------------------------+ +end of test diff --git a/ext/interbase/tests/005.phpt b/ext/interbase/tests/005.phpt new file mode 100644 index 0000000000..5cf77667e0 --- /dev/null +++ b/ext/interbase/tests/005.phpt @@ -0,0 +1,275 @@ +--TEST-- +InterBase: transactions +--SKIPIF-- +<?php if (!extension_loaded("interbase")) print "skip"; ?> +--POST-- +--GET-- +--FILE-- +<? +/* $Id$ */ + + require("interbase/interbase.inc"); + + $test_base = "ibase_test.tmp"; + + ibase_connect($test_base); + + @ibase_query("create table test5 (i integer)"); + @ibase_query("delete from test5"); + ibase_close(); + + + echo "default transaction:\n"; + +/* +Difference between default and other transactions: +default commited when you call ibase_close(). +Other transaction doing rollback. + +If you not open default transaction with +ibase_trans, default transaction open +when you call ibase_query(), ibase_prepare(), +ibase_blob_create(), ibase_blob_import() first time. +*/ + +/* +simple default transaction test without ibase_trans() +*/ + + ibase_connect($test_base); + + echo "empty table\n"; + + /* out_table call ibase_query() + and ibase_query() start default transaction */ + out_table("test5"); + + /* in default transaction context */ + ibase_query("insert into test5 (i) values (1)"); + + echo "one row\n"; + out_table("test5"); + + ibase_rollback(); /* default rolled */ + + echo "after rollback table empty again\n"; + out_table("test5"); /* started new default transaction */ + + ibase_query("insert into test5 (i) values (2)"); + + ibase_close(); /* commit here! */ + + ibase_connect($test_base); + + echo "one row\n"; + out_table("test5"); + ibase_close(); + +/* +default transaction on default link +First open transaction on link will be default. +$tr_def_l1 may be ommited. All queryes without link and trans +parameters run in this context +*/ + + $link_def = ibase_connect($test_base); + + $tr_def_l1 = ibase_trans(IBASE_READ); /* here transaction start */ + + /* all default */ + $res = ibase_query("select * from test5"); + + echo "one row\n"; + out_result($res,"test5"); + + ibase_free_result($res); + + /* specify transaction context... */ + $res = ibase_query($tr_def_l1, "select * from test5"); + + echo "one row... again.\n"; + out_result($res,"test5"); + + ibase_free_result($res); + + /* specify default transaction on link */ + $res = ibase_query($link_def, "select * from test5"); + + echo "one row.\n"; + out_result($res,"test5"); + + ibase_free_result($res); + + ibase_rollback($link_def); /* just for example */ + + ibase_close(); + +/* +three transaction on default link +*/ + ibase_connect($test_base); + + $tr_1 = ibase_trans(); /* this default transaction also */ + $tr_2 = ibase_trans(IBASE_READ); + $tr_3 = ibase_trans(IBASE_READ+IBASE_COMMITED); + + $res = ibase_query("select * from test5"); + + echo "one row\n"; + out_result($res,"test5"); + + ibase_free_result($res); + + /* insert in first transaction context... */ + /* as default */ + ibase_query("insert into test5 (i) values (3)"); + /* specify context */ + ibase_query($tr_1, "insert into test5 (i) values (4)"); + + $res = ibase_query("select * from test5"); + + echo "three rows\n"; + out_result($res,"test5"); + + ibase_free_result($res); + + $res = ibase_query($tr_1, "select * from test5"); + + echo "three rows again\n"; + out_result($res,"test5"); + + ibase_free_result($res); + + ibase_commit($tr_1); + + $res = ibase_query($tr_2, "select * from test5"); + + echo "one row in second transaction\n"; + out_result($res,"test5"); + + ibase_free_result($res); + + $res = ibase_query($tr_3, "select * from test5"); + + echo "three rows in third transaction\n"; + out_result($res,"test5"); + + ibase_free_result($res); + + ibase_close(); + +/* +transactions on second link +*/ + $link_1 = ibase_pconnect($test_base); + $link_2 = ibase_pconnect($test_base); + + $tr_1 = ibase_trans($link_2, IBASE_DEFAULT); /* this default transaction also */ + $tr_2 = ibase_trans($link_2, IBASE_COMMITED); + + $res = ibase_query($tr_1, "select * from test5"); + + echo "three rows\n"; + out_result($res,"test5"); + + ibase_free_result($res); + + ibase_query($tr_1, "insert into test5 (i) values (5)"); + + $res = ibase_query($tr_1, "select * from test5"); + + echo "four rows\n"; + out_result($res,"test5"); + + ibase_free_result($res); + + ibase_commit($tr_1); + + $res = ibase_query($tr_2, "select * from test5"); + + echo "four rows again\n"; + out_result($res,"test5"); + + ibase_free_result($res); + + ibase_close($link_1); + ibase_close($link_2); + + echo "end of test\n"; +?> +--EXPECT-- +default transaction: +empty table +--- test5 --- +--- +one row +--- test5 --- +1 +--- +after rollback table empty again +--- test5 --- +--- +one row +--- test5 --- +2 +--- +one row +--- test5 --- +2 +--- +one row... again. +--- test5 --- +2 +--- +one row. +--- test5 --- +2 +--- +one row +--- test5 --- +2 +--- +three rows +--- test5 --- +2 +3 +4 +--- +three rows again +--- test5 --- +2 +3 +4 +--- +one row in second transaction +--- test5 --- +2 +--- +three rows in third transaction +--- test5 --- +2 +3 +4 +--- +three rows +--- test5 --- +2 +3 +4 +--- +four rows +--- test5 --- +2 +3 +4 +5 +--- +four rows again +--- test5 --- +2 +3 +4 +5 +--- +end of test + diff --git a/ext/interbase/tests/006.phpt b/ext/interbase/tests/006.phpt new file mode 100644 index 0000000000..bad07e3315 --- /dev/null +++ b/ext/interbase/tests/006.phpt @@ -0,0 +1,227 @@ +--TEST-- +InterBase: binding (may take a while) +--SKIPIF-- +<?php if (!extension_loaded("interbase")) print "skip"; ?> +--POST-- +--GET-- +--FILE-- +<? +/* $Id$ */ + + require("interbase/interbase.inc"); + + $test_base = "ibase_test.tmp"; + + ibase_connect($test_base); + + ibase_query( + "create table test6 ( + iter integer, + v_char char(1000), + v_date date, + v_decimal decimal(12,3), + v_double double precision, + v_float float, + v_integer integer, + v_numeric numeric(4,2), + v_smallint smallint, + v_varchar varchar(10000) + )"); + ibase_commit(); + + /* if timefmt not supported, hide error */ + @ibase_timefmt("%m/%d/%Y %H:%M:%S"); + + echo "insert\n"; + + for($iter = 0; $iter < 3; $iter++){ + /* prepare data */ + $v_char = rand_str(1000); + $v_date = rand_datetime(); + $v_decimal = rand_number(12,3); + $v_double = rand_number(20); + $v_float = rand_number(7); + $v_integer = rand_number(9,0); + $v_numeric = rand_number(4,2); + $v_smallint = rand_number(5) % 32767; + $v_varchar = rand_str(10000); + + ibase_query("insert into test6 + (iter,v_char,v_date,v_decimal,v_double,v_float, + v_integer,v_numeric,v_smallint,v_varchar) + values (?,?,?,?,?,?,?,?,?,?)", + $iter, $v_char, $v_date, $v_decimal, $v_double, $v_float, + $v_integer, $v_numeric, $v_smallint, $v_varchar); + $sel = ibase_query("select * from test6 where iter = $iter"); + + $row = ibase_fetch_object($sel); + if(substr($row->V_CHAR,0,strlen($v_char)) != $v_char){ + echo " CHAR fail:\n"; + echo " in: $v_char\n"; + echo " out: $row->V_CHAR\n"; + } + if($row->V_DATE != $v_date){ + echo " DATE fail\n"; + echo " in: $v_date\n"; + echo " out: $row->V_DATE\n"; + } + if($row->V_DECIMAL != $v_decimal){ + echo " DECIMAL fail\n"; + echo " in: $v_decimal\n"; + echo " out: $row->V_DECIMAL\n"; + } + if(abs($row->V_DOUBLE - $v_double) > abs($v_double / 1E15)){ + echo " DOUBLE fail\n"; + echo " in: $v_double\n"; + echo " out: $row->V_DOUBLE\n"; + } + if(abs($row->V_FLOAT - $v_float) > abs($v_float / 1E7)){ + echo " FLOAT fail\n"; + echo " in: $v_float\n"; + echo " out: $row->V_FLOAT\n"; + } + if($row->V_INTEGER != $v_integer){ + echo " INTEGER fail\n"; + echo " in: $v_integer\n"; + echo " out: $row->V_INTEGER\n"; + } + ibase_free_result($sel); + }/* for($iter)*/ + + echo "select\n"; + for($iter = 0; $iter < 3; $iter++){ + /* prepare data */ + $v_char = rand_str(1000); + $v_date = rand_datetime(); + $v_decimal = rand_number(12,3); + $v_double = rand_number(20); + $v_float = rand_number(7); + $v_integer = rand_number(9,0); + $v_numeric = rand_number(4,2); + $v_smallint = rand_number(5) % 32767; + $v_varchar = rand_str(10000); + + /* clear table*/ + ibase_query("delete from test6"); + + /* make one record */ + ibase_query("insert into test6 + (iter, v_char,v_date,v_decimal, + v_integer,v_numeric,v_smallint,v_varchar) + values (666, '$v_char','$v_date',$v_decimal, $v_integer, + $v_numeric, $v_smallint, '$v_varchar')"); + + /* test all types */ + if(!($sel = ibase_query( + "select iter from test6 where v_char = ?", $v_char))) + echo "CHAR fail\n"; + ibase_free_result($sel); + if(!($sel = ibase_query( + "select iter from test6 where v_date = ?", $v_date))) + echo "DATE fail\n"; + ibase_free_result($sel); + if(!($sel = ibase_query( + "select iter from test6 where v_decimal = ?", $v_decimal))) + echo "DECIMAL fail\n"; + ibase_free_result($sel); + if(!($sel = ibase_query( + "select iter from test6 where v_integer = ?", $v_integer))) + echo "INTEGER fail\n"; + ibase_free_result($sel); + if(!($sel = ibase_query( + "select iter from test6 where v_numeric = ?", $v_numeric))) + echo "NUMERIC fail\n"; + ibase_free_result($sel); + if(!($sel = ibase_query( + "select iter from test6 where v_smallint = ?", $v_smallint))) + echo "SMALLINT fail\n"; + ibase_free_result($sel); + if(!($sel = ibase_query( + "select iter from test6 where v_varchar = ?", $v_varchar))) + echo "VARCHAR fail\n"; + ibase_free_result($sel); + + }/*for iter*/ + + echo "prepare and exec insert\n"; + + /* prepare table */ + ibase_query("delete from test6"); + + /* prepare query */ + $query = ibase_prepare( + "insert into test6 (v_integer) values (?)"); + + for($i = 0; $i < 10; $i++) + ibase_execute($query, $i); + + out_table("test6"); + + ibase_free_query($query); + + + echo "prepare and exec select\n"; + + /* prepare query */ + $query = ibase_prepare("select * from test6 + where v_integer between ? and ?"); + + $low_border = 2; + $high_border = 6; + + $res = ibase_execute($query, $low_border, $high_border); + out_result($res, "test6"); + ibase_free_result($res); + + $low_border = 0; + $high_border = 4; + $res = ibase_execute($query, $low_border, $high_border); + out_result($res, "test6"); + ibase_free_result($res); + + $res = ibase_execute($query, "5", 7.5); + out_result($res, "test6"); + ibase_free_result($res); + + ibase_free_query($query); + ibase_close(); + echo "end of test\n"; +?> +--EXPECT-- +insert +select +prepare and exec insert +--- test6 --- + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +--- +prepare and exec select +--- test6 --- + 2 + 3 + 4 + 5 + 6 +--- +--- test6 --- + 0 + 1 + 2 + 3 + 4 +--- +--- test6 --- + 5 + 6 + 7 +--- +end of test + diff --git a/ext/interbase/tests/extension b/ext/interbase/tests/extension new file mode 100755 index 0000000000..3b561c46a9 --- /dev/null +++ b/ext/interbase/tests/extension @@ -0,0 +1 @@ +InterBase diff --git a/ext/interbase/tests/interbase.inc b/ext/interbase/tests/interbase.inc new file mode 100755 index 0000000000..f261cb01b5 --- /dev/null +++ b/ext/interbase/tests/interbase.inc @@ -0,0 +1,77 @@ +<? +/* $Id$ */ +/* used in tests */ + +srand((double)microtime()*1000000); + +function out_table($table_name) +{ + echo "--- $table_name ---\n"; + $res = ibase_query("select * from $table_name"); + $f = ibase_num_fields($res); + while ($r = ibase_fetch_row($res)){ + for($i = 0; $i < $f; $i++) + echo "$r[$i]\t"; + echo "\n"; + } + ibase_free_result($res); + echo "---\n"; +} + +function out_result($result, $table_name = "") +{ + echo "--- $table_name ---\n"; + $f = ibase_num_fields($result); + while ($r = ibase_fetch_row($result)){ + for($i = 0; $i < $f; $i++) + echo "$r[$i]\t"; + echo "\n"; + } + echo "---\n"; +} + +/* M/D/Y H:M:S */ +function rand_datetime() +{ + return sprintf("%02d/%02d/%4d %02d:%02d:%02d", + rand()%12+1, rand()%28+1, rand()%100+1910, + rand()%24, rand()%60, rand()%60); +} + +/* random binary string */ +function rand_binstr($max_len) +{ + $len = rand() % $max_len; + $s = ""; + while($len--) + $s .= sprintf("%c", rand() % 256); + return $s; +} + +function rand_str($max_len) +{ + $len = rand() % $max_len; + $s = ""; + while($len--) + $s .= sprintf("%c", rand() % 26 + 65);; + return $s; +} + +function rand_number($len , $prec = -1, $sign = 1) +{ + if($prec == -1){ + $n = substr(rand() . rand(), 0, rand() % $len + 1); + if(strlen($n) < $len) + $n .= "." . substr(rand(), 0, rand() % ($len - strlen($n)) + 1); + }elseif ($prec == 0){ + $n = substr(rand() . rand(), 0, rand() % $len + 1); + }else{ + $n = substr(rand() . rand(), 0, rand() % ($len - $prec) + 1); + $n .= "." . substr(rand(), 0, $prec); + } + if($sign && (rand() % 3 == 0)) + $n = "-" .$n; + return $n; +} + +?>
\ No newline at end of file diff --git a/ext/standard/tests/file/001.phpt b/ext/standard/tests/file/001.phpt new file mode 100644 index 0000000000..b95a1e6d65 --- /dev/null +++ b/ext/standard/tests/file/001.phpt @@ -0,0 +1,141 @@ +--TEST-- +File type functions +--POST-- +--GET-- +--FILE-- +<?php +@unlink('test.file'); +@unlink('test.link'); +if (file_exists('test.file')) { + echo "test.file exists\n"; +} else { + echo "test.file does not exist\n"; +} +fclose (fopen('test.file', 'w')); +chmod ('test.file', 0654); +if (file_exists('test.file')) { + echo "test.file exists\n"; +} else { + echo "test.file does not exist\n"; +} +sleep (2); +symlink('test.file','test.link'); +if (file_exists('test.link')) { + echo "test.link exists\n"; +} else { + echo "test.link does not exist\n"; +} +if (is_link('test.file')) { + echo "test.file is a symlink\n"; +} else { + echo "test.file is not a symlink\n"; +} +if (is_link('test.link')) { + echo "test.link is a symlink\n"; +} else { + echo "test.link is not a symlink\n"; +} +if (file_exists('test.file')) { + echo "test.file exists\n"; +} else { + echo "test.file does not exist\n"; +} +$s = stat ('test.file'); +$ls = lstat ('test.file'); +for ($i = 0; $i <= 12; $i++) { + if ($ls[$i] != $s[$i]) { + echo "test.file lstat and stat differ at element $i\n"; + } +} +$s = stat ('test.link'); +$ls = lstat ('test.link'); +for ($i = 0; $i <= 11; $i++) { + if ($ls[$i] != $s[$i]) { + if($i!=6) echo "test.link lstat and stat differ at element $i\n"; + } +} +echo "test.file is " . filetype('test.file') . "\n"; +echo "test.link is " . filetype('test.link') . "\n"; +printf ("test.file permissions are 0%o\n", 0777 & fileperms('test.file')); +echo "test.file size is " . filesize('test.file') . "\n"; +if (is_writeable('test.file')) { + echo "test.file is writeable\n"; +} else { + echo "test.file is not writeable\n"; +} +if (is_readable('test.file')) { + echo "test.file is readable\n"; +} else { + echo "test.file is not readable\n"; +} +if (is_executable('test.file')) { + echo "test.file is executable\n"; +} else { + echo "test.file is not executable\n"; +} +if (is_file('test.file')) { + echo "test.file is a regular file\n"; +} else { + echo "test.file is not a regular file\n"; +} +if (is_file('test.link')) { + echo "test.link is a regular file\n"; +} else { + echo "test.link is not a regular file\n"; +} +if (is_dir('test.link')) { + echo "test.link is a directory\n"; +} else { + echo "test.link is not a directory\n"; +} +if (is_dir('file')) { + echo "file is a directory\n"; +} else { + echo "file is not a directory\n"; +} +if (is_dir('test.file')) { + echo "test.file is a directory\n"; +} else { + echo "test.file is not a directory\n"; +} +unlink('test.file'); +unlink('test.link'); +if (file_exists('test.file')) { + echo "test.file exists (cached)\n"; +} else { + echo "test.file does not exist\n"; +} +clearstatcache(); +if (file_exists('test.file')) { + echo "test.file exists\n"; +} else { + echo "test.file does not exist\n"; +} +?> +--EXPECT-- +test.file does not exist +test.file exists +test.link exists +test.file is not a symlink +test.link is a symlink +test.file exists +test.link lstat and stat differ at element 1 +test.link lstat and stat differ at element 2 +test.link lstat and stat differ at element 7 +test.link lstat and stat differ at element 8 +test.link lstat and stat differ at element 9 +test.link lstat and stat differ at element 10 +test.file is file +test.link is link +test.file permissions are 0654 +test.file size is 0 +test.file is writeable +test.file is readable +test.file is not executable +test.file is a regular file +test.link is a regular file +test.link is not a directory +file is a directory +test.file is not a directory +test.file does not exist +test.file does not exist diff --git a/ext/standard/tests/general_functions/001.phpt b/ext/standard/tests/general_functions/001.phpt new file mode 100644 index 0000000000..ee6d32f7f8 --- /dev/null +++ b/ext/standard/tests/general_functions/001.phpt @@ -0,0 +1,55 @@ +--TEST-- +sprintf() function +--POST-- +--GET-- +--FILE-- +<?php + +$agent = sprintf("%.5s", "James Bond, 007"); + +echo("sprintf string truncate test: "); +if ($agent == "James") { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo("sprintf padding and align test: "); +$test = sprintf("abc%04d %-20s%c", 20, "fisketur", 33); +if ($test == "abc0020 fisketur !") { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo("sprintf octal and hex test: "); +$test = sprintf("%4o %4x %4X %0"."8x", 128, 1024, 49151, 3457925); +if ($test == " 200 400 BFFF 0034c385") { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo("sprintf octal binary test: "); +$test = sprintf("%b", 3457925); +if ($test == "1101001100001110000101") { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo("sprintf float test: "); +$test = sprintf("%0"."06.2f", 10000/3.0); +if ($test == "003333.33") { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +?> +--EXPECT-- +sprintf string truncate test: passed +sprintf padding and align test: passed +sprintf octal and hex test: passed +sprintf octal binary test: passed +sprintf float test: passed diff --git a/ext/standard/tests/math/001.phpt b/ext/standard/tests/math/001.phpt new file mode 100644 index 0000000000..dee4217342 --- /dev/null +++ b/ext/standard/tests/math/001.phpt @@ -0,0 +1,25 @@ +--TEST-- +Simple math tests +--POST-- +--GET-- +--FILE-- +<?php + echo abs(-1) . "\n"; + echo abs(-1.5) . "\n"; + echo abs("-1") . "\n"; + echo abs("-1.5") . "\n"; + echo ceil(-1.5) . "\n"; + echo ceil(1.5) . "\n"; + echo floor(-1.5) . "\n"; + echo floor(1.5) . "\n"; +?> +--EXPECT-- + +1 +1.5 +1 +1.5 +-1 +2 +-2 +1 diff --git a/ext/standard/tests/reg/001.phpt b/ext/standard/tests/reg/001.phpt new file mode 100644 index 0000000000..f63c252518 --- /dev/null +++ b/ext/standard/tests/reg/001.phpt @@ -0,0 +1,9 @@ +--TEST-- +RegReplace test 1 +--POST-- +--GET-- +--FILE-- +<?php $a="abc123"; + echo ereg_replace("123","def",$a)?> +--EXPECT-- +abcdef diff --git a/ext/standard/tests/reg/002.phpt b/ext/standard/tests/reg/002.phpt new file mode 100644 index 0000000000..a9b7aaa00a --- /dev/null +++ b/ext/standard/tests/reg/002.phpt @@ -0,0 +1,9 @@ +--TEST-- +RegReplace test 2 +--POST-- +--GET-- +--FILE-- +<?php $a="abc123"; + echo ereg_replace("123","",$a)?> +--EXPECT-- +abc diff --git a/ext/standard/tests/reg/003.phpt b/ext/standard/tests/reg/003.phpt new file mode 100644 index 0000000000..bb42729ca2 --- /dev/null +++ b/ext/standard/tests/reg/003.phpt @@ -0,0 +1,11 @@ +--TEST-- +ereg_replace single-quote test +--POST-- +--GET-- +--FILE-- +<?php $a="\\'test"; + echo ereg_replace("\\\\'","'",$a) +?> +--EXPECT-- + +'test diff --git a/ext/standard/tests/reg/004.phpt b/ext/standard/tests/reg/004.phpt new file mode 100644 index 0000000000..1f60ff4900 --- /dev/null +++ b/ext/standard/tests/reg/004.phpt @@ -0,0 +1,16 @@ +--TEST-- +simple ereg test +--POST-- +--GET-- +--FILE-- +<?php $a="This is a nice and simple string"; + if (ereg(".*nice and simple.*",$a)) { + echo "ok\n"; + } + if (!ereg(".*doesn't exist.*",$a)) { + echo "ok\n"; + } +?> +--EXPECT-- +ok +ok diff --git a/ext/standard/tests/reg/005.phpt b/ext/standard/tests/reg/005.phpt new file mode 100644 index 0000000000..78c0a0912a --- /dev/null +++ b/ext/standard/tests/reg/005.phpt @@ -0,0 +1,20 @@ +--TEST-- +Test Regular expression register support in ereg +--POST-- +--GET-- +--FILE-- +<?php $a="This is a nice and simple string"; + echo ereg(".*(is).*(is).*",$a,$registers); + echo "\n"; + echo $registers[0]; + echo "\n"; + echo $registers[1]; + echo "\n"; + echo $registers[2]; + echo "\n"; +?> +--EXPECT-- +32 +This is a nice and simple string +is +is diff --git a/ext/standard/tests/reg/006.phpt b/ext/standard/tests/reg/006.phpt new file mode 100644 index 0000000000..50b6dbfd3a --- /dev/null +++ b/ext/standard/tests/reg/006.phpt @@ -0,0 +1,10 @@ +--TEST-- +Test ereg_replace of start-of-line +--POST-- +--GET-- +--FILE-- +<?php $a="This is a nice and simple string"; + echo ereg_replace("^This","That",$a); +?> +--EXPECT-- +That is a nice and simple string diff --git a/ext/standard/tests/reg/007.phpt b/ext/standard/tests/reg/007.phpt new file mode 100644 index 0000000000..2223d48e22 --- /dev/null +++ b/ext/standard/tests/reg/007.phpt @@ -0,0 +1,12 @@ +--TEST-- +Test empty result buffer in reg_replace +--POST-- +--GET-- +--FILE-- +<?php + $a="abcd"; + $b=ereg_replace("abcd","",$a); + echo strlen($b); +?> +--EXPECT-- +0 diff --git a/ext/standard/tests/reg/008.phpt b/ext/standard/tests/reg/008.phpt new file mode 100644 index 0000000000..db61d1ca07 --- /dev/null +++ b/ext/standard/tests/reg/008.phpt @@ -0,0 +1,10 @@ +--TEST-- +Test back-references in regular expressions +--POST-- +--GET-- +--FILE-- +<?php + echo ereg_replace("([a-z]*)([-=+|]*)([0-9]+)","\\3 \\1 \\2\n","abc+-|=123"); +?> +--EXPECT-- +123 abc +-|= diff --git a/ext/standard/tests/reg/009.phpt b/ext/standard/tests/reg/009.phpt new file mode 100644 index 0000000000..4996ef4c97 --- /dev/null +++ b/ext/standard/tests/reg/009.phpt @@ -0,0 +1,19 @@ +--TEST-- +Test split() +--POST-- +--GET-- +--FILE-- +<?php + $a=split("[[:space:]]","this is a +test"); + echo count($a) . "\n"; + for ($i = 0; $i < count($a); $i++) { + echo $a[$i] . "\n"; + } +?> +--EXPECT-- +4 +this +is +a +test diff --git a/ext/standard/tests/reg/010.phpt b/ext/standard/tests/reg/010.phpt new file mode 100644 index 0000000000..30d28fd02f --- /dev/null +++ b/ext/standard/tests/reg/010.phpt @@ -0,0 +1,9 @@ +--TEST-- +Long back references +--POST-- +--GET-- +--FILE-- +<?php $a="abc122222222223"; + echo ereg_replace("1(2*)3","\\1def\\1",$a)?> +--EXPECT-- +abc2222222222def2222222222 diff --git a/ext/standard/tests/reg/011.phpt b/ext/standard/tests/reg/011.phpt new file mode 100644 index 0000000000..4eda774f58 --- /dev/null +++ b/ext/standard/tests/reg/011.phpt @@ -0,0 +1,9 @@ +--TEST-- +\0 back reference +--POST-- +--GET-- +--FILE-- +<?php $a="abc123"; + echo ereg_replace("123","def\\0ghi",$a)?> +--EXPECT-- +abcdef123ghi diff --git a/ext/standard/tests/reg/012.phpt b/ext/standard/tests/reg/012.phpt new file mode 100644 index 0000000000..d5342c7436 --- /dev/null +++ b/ext/standard/tests/reg/012.phpt @@ -0,0 +1,9 @@ +--TEST-- +nonexisting back reference +--POST-- +--GET-- +--FILE-- +<?php $a="abc123"; + echo ereg_replace("123",'def\1ghi',$a)?> +--EXPECT-- +abcdef\1ghi diff --git a/ext/standard/tests/reg/013.phpt b/ext/standard/tests/reg/013.phpt new file mode 100644 index 0000000000..ec3329fa7c --- /dev/null +++ b/ext/standard/tests/reg/013.phpt @@ -0,0 +1,9 @@ +--TEST-- +escapes in replace string +--POST-- +--GET-- +--FILE-- +<?php $a="abc123"; + echo ereg_replace("123","def\\g\\\\hi\\",$a)?> +--EXPECT-- +abcdef\g\\hi\ diff --git a/ext/standard/tests/reg/014.phpt b/ext/standard/tests/reg/014.phpt new file mode 100644 index 0000000000..ec4d19ed0e --- /dev/null +++ b/ext/standard/tests/reg/014.phpt @@ -0,0 +1,9 @@ +--TEST-- +backreferences not replaced recursively +--POST-- +--GET-- +--FILE-- +<?php $a="a\\2bxc"; + echo ereg_replace("a(.*)b(.*)c","\\1",$a)?> +--EXPECT-- +\2 diff --git a/ext/standard/tests/reg/015.phpt b/ext/standard/tests/reg/015.phpt new file mode 100644 index 0000000000..961a60fa76 --- /dev/null +++ b/ext/standard/tests/reg/015.phpt @@ -0,0 +1,8 @@ +--TEST-- +replace empty matches +--POST-- +--GET-- +--FILE-- +<?php echo ereg_replace("^","z","abc123")?> +--EXPECT-- +zabc123 diff --git a/ext/standard/tests/reg/016.phpt b/ext/standard/tests/reg/016.phpt new file mode 100644 index 0000000000..a24816f182 --- /dev/null +++ b/ext/standard/tests/reg/016.phpt @@ -0,0 +1,8 @@ +--TEST-- +test backslash handling in regular expressions +--POST-- +--GET-- +--FILE-- +<?php echo ereg_replace('\?',"abc","?123?")?> +--EXPECT-- +abc123abc diff --git a/pear/DB.php b/pear/DB.php index abcdea8674..b111aaa801 100644 --- a/pear/DB.php +++ b/pear/DB.php @@ -24,8 +24,6 @@ require_once "PEAR.php"; -// {{{ Database independent error codes. - /* * The method mapErrorCode in each DB_dbtype implementation maps * native error codes to one of these. @@ -55,15 +53,15 @@ define("DB_ERROR_NOSUCHTABLE", -18); define("DB_ERROR_NOSUCHFIELD", -19); define("DB_ERROR_NEED_MORE_DATA", -20); + /* * Warnings are not detected as errors by DB::isError(), and are not * fatal. You can detect whether an error is in fact a warning with * DB::isWarning(). */ -define("DB_WARNING_READ_ONLY", -1000); +define("DB_WARNING", -1000); +define("DB_WARNING_READ_ONLY", -1001); -// }}} -// {{{ Prepare/execute parameter types /* * These constants are used when storing information about prepared @@ -79,8 +77,6 @@ define("DB_WARNING_READ_ONLY", -1000); define("DB_PARAM_SCALAR", 1); define("DB_PARAM_OPAQUE", 2); -// }}} -// {{{ Binary data modes /* * These constants define different ways of returning binary data @@ -97,8 +93,6 @@ define("DB_BINMODE_PASSTHRU", 1); define("DB_BINMODE_RETURN", 2); define("DB_BINMODE_CONVERT", 3); -// }}} -// {{{ Get modes: flags that control the layout of query result structures /** * Column data indexed by numbers, ordered from 0 and up @@ -116,6 +110,7 @@ define('DB_GETMODE_ASSOC', 2); */ define('DB_GETMODE_FLIPPED', 4); + /** * This constant DB's default get mode. It is possible to override by * defining in your scripts before including DB. @@ -124,7 +119,6 @@ if (!defined('DB_GETMODE_DEFAULT')) { define('DB_GETMODE_DEFAULT', DB_GETMODE_ORDERED); } -// }}} /** * The main "DB" class is simply a container class with some static @@ -152,9 +146,6 @@ if (!defined('DB_GETMODE_DEFAULT')) { * @since PHP 4.0 */ class DB { - - // {{{ factory() - /** * Create a new DB object for the specified database type * @@ -173,9 +164,6 @@ class DB { return $obj; } - // }}} - // {{{ connect() - /** * Create a new DB object and connect to the specified database * @@ -189,9 +177,7 @@ class DB { * @return object a newly created DB object, or a DB error code on * error */ - function &connect(&$dsn, $persistent = false) { - global $USED_PACKAGES; - + function &connect($dsn, $persistent = false) { $dsninfo = DB::parseDSN($dsn); $type = $dsninfo['phptype']; @include_once("DB/${type}.php"); @@ -207,9 +193,6 @@ class DB { return $obj; } - // }}} - // {{{ apiVersion() - /** * Return the DB API version * @@ -219,9 +202,6 @@ class DB { return 1; } - // }}} - // {{{ isError() - /** * Tell whether a result code from a DB method is an error * @@ -230,12 +210,11 @@ class DB { * @return bool whether $value is an error */ function isError($value) { - return is_object($value) && is_subclass_of($value, "DB_Error"); + return is_object($value) && + (get_class($value) == "db_error" || + is_subclass_of($value, "db_error")); } - // }}} - // {{{ isWarning() - /** * Tell whether a result code from a DB method is a warning. * Warnings differ from errors in that they are generated by DB, @@ -246,12 +225,11 @@ class DB { * @return bool whether $value is a warning */ function isWarning($value) { - return is_object($value) && is_subclass_of($value, "DB_Warning"); + return is_object($value) && + (get_class($value) == "db_warning" || + is_subclass_of($value, "db_warning")); } - // }}} - // {{{ errorMessage() - /** * Return a textual error message for a DB error code * @@ -282,7 +260,8 @@ class DB { DB_ERROR_CANNOT_DROP => "can not drop", DB_ERROR_NOSUCHTABLE => "no such table", DB_ERROR_NOSUCHFIELD => "no such field", - DB_WARNING_READ_ONLY => "warning: read only" + DB_WARNING => "unknown warning", + DB_WARNING_READ_ONLY => "read only" ); } if (DB::isError($value)) { @@ -291,9 +270,6 @@ class DB { return $errorMessages[$value]; } - // }}} - // {{{ parseDSN() - /** * Parse a data source name * @@ -401,8 +377,6 @@ class DB { return $parsed; } - - // }}} } /** @@ -413,14 +387,10 @@ class DB { * @author Stig Bakken <ssb@fast.no> */ class DB_result { - // {{{ properties var $dbh; var $result; - // }}} - // {{{ DB_result() - /** * DB_result constructor. * @param $dbh DB object reference @@ -431,9 +401,6 @@ class DB_result { $this->result = $result; } - // }}} - // {{{ fetchRow() - /** * Fetch and return a row of data. * @return array a row of data, or false on error @@ -442,9 +409,6 @@ class DB_result { return $this->dbh->fetchRow($this->result, $getmode); } - // }}} - // {{{ fetchInto() - /** * Fetch a row of data into an existing array. * @@ -455,9 +419,6 @@ class DB_result { return $this->dbh->fetchInto($this->result, $arr, $getmode); } - // }}} - // {{{ numCols() - /** * Get the the number of columns in a result set. * @@ -467,9 +428,6 @@ class DB_result { return $this->dbh->numCols($this->result); } - // }}} - // {{{ free() - /** * Frees the resources allocated for this result set. * @return int error code @@ -482,8 +440,6 @@ class DB_result { $this->result = false; return true; } - - // }}} } /** @@ -493,10 +449,23 @@ class DB_result { * @author Stig Bakken <ssb@fast.no> */ class DB_Error extends PEAR_Error { + /** + * DB_Error constructor. + * + * @param $code mixed DB error code, or string with error message. + * @param $mode int what "error mode" to operate in + * @param $level what error level to use for $mode == PEAR_ERROR_TRIGGER + * + * @access public + */ function DB_Error($code = DB_ERROR, $mode = PEAR_ERROR_RETURN, $level = E_USER_NOTICE) { - $this->PEAR_Error("DB Error: " . DB::errorMessage($code), $code, $mode, $level); + if (is_int($code)) { + $this->PEAR_Error("DB Error: " . DB::errorMessage($code), $code, $mode, $level); + } else { + $this->PEAR_Error("DB Error: $code", 0, $mode, $level); + } } } @@ -507,10 +476,23 @@ class DB_Error extends PEAR_Error { * @author Stig Bakken <ssb@fast.no> */ class DB_Warning extends PEAR_Error { - function DB_Error($code = DB_WARNING, - $mode = PEAR_ERROR_RETURN, - $level = E_USER_NOTICE) { - $this->PEAR_Error("DB Warning: " . DB::errorMessage($code), $code, $mode, $level); + /** + * DB_Warning constructor. + * + * @param $code mixed DB error code, or string with error message. + * @param $mode int what "error mode" to operate in + * @param $level what error level to use for $mode == PEAR_ERROR_TRIGGER + * + * @access public + */ + function DB_Warning($code = DB_WARNING, + $mode = PEAR_ERROR_RETURN, + $level = E_USER_NOTICE) { + if (is_int($code)) { + $this->PEAR_Error("DB Warning: " . DB::errorMessage($code), $code, $mode, $level); + } else { + $this->PEAR_Error("DB Warning: $code", 0, $mode, $level); + } } } diff --git a/pear/Makefile.in b/pear/Makefile.in index 4582ee1dfc..f67942a592 100644 --- a/pear/Makefile.in +++ b/pear/Makefile.in @@ -12,22 +12,32 @@ peardir=$(PEAR_INSTALLDIR) PEAR_SUBDIRS = \ DB \ File \ + HTML \ Net \ - PEAR + Payment \ + PEAR \ + XML PEAR_FILES = \ DB.php \ DB/common.php \ - DB/odbc.php \ - DB/mysql.php \ + DB/ibase.php \ + DB/msql.php \ DB/mssql.php \ + DB/mysql.php \ + DB/oci8.php \ + DB/odbc.php \ DB/pgsql.php \ DB/storage.php \ - DB/oci8.php \ - HTTP.php \ + DB/sybase.php \ File/Find.php \ + HTML/Form.php \ + HTTP.php \ Net/Socket.php \ - PEAR/Installer.php + PEAR.php \ + PEAR/Installer.php \ + Payment/Verisign.php \ + XML/Parser.php install-data-local: PEAR.php @if $(mkinstalldirs) $(peardir); then \ diff --git a/pear/run-tests.in b/pear/run-tests.in index d147f0a806..2ebf1a56bc 100755 --- a/pear/run-tests.in +++ b/pear/run-tests.in @@ -24,7 +24,7 @@ $passed = 0; $tests = 0; while ($dir = trim(fgets($fp, 1024))) { - print "DIRECTORY : $dir\n"; +// print "DIRECTORY : $dir\n"; //print "dir=$dir\n"; $dp = opendir($dir); while ($ent = readdir($dp)) { diff --git a/pear/tests/DB::factory.phpt b/pear/tests/DB::factory.phpt new file mode 100644 index 0000000000..2142797269 --- /dev/null +++ b/pear/tests/DB::factory.phpt @@ -0,0 +1,46 @@ +--TEST-- +DB::factory test +--SKIPIF-- +<?php if (!include("DB.php")) print "skip"; ?> +--FILE-- +<?php // -*- C++ -*- + +// Test for: DB.php +// Parts tested: DB_Error, DB_Warning + +require_once "DB.php"; + +$backends = array( + "ibase", + "msql", + "mssql", + "mysql", + "oci8", + "odbc", + "pgsql", + "sybase" +); + +reset($backends); +while (list($i, $name) = each($backends)) { + print "testing $name: "; + $obj = DB::factory($name); + if (DB::isError($obj)) { + print "error: ".$obj->getMessage()."\n"; + } else { + print "object: ".$obj->toString()."\n"; + } +} + +?> +--GET-- +--POST-- +--EXPECT-- +testing ibase: object: db_ibase: (phptype=ibase, dbsyntax=ibase) +testing msql: object: db_msql: (phptype=msql, dbsyntax=msql) +testing mssql: object: db_mssql: (phptype=mssql, dbsyntax=mssql) +testing mysql: object: db_mysql: (phptype=mysql, dbsyntax=mysql) +testing oci8: object: db_oci8: (phptype=oci8, dbsyntax=oci8) +testing odbc: object: db_odbc: (phptype=odbc, dbsyntax=unknown) +testing pgsql: object: db_pgsql: (phptype=pgsql, dbsyntax=pgsql) +testing sybase: object: db_sybase: (phptype=sybase, dbsyntax=sybase) diff --git a/pear/tests/DB::parseDSN.phpt b/pear/tests/DB::parseDSN.phpt new file mode 100644 index 0000000000..6d3031bfa0 --- /dev/null +++ b/pear/tests/DB::parseDSN.phpt @@ -0,0 +1,39 @@ +--TEST-- +DB::parseDSN test +--SKIPIF-- +<?php if (!include("DB.php")) print "skip"; ?> +--FILE-- +<?php // -*- C++ -*- + +// Test for: DB.php +// Parts tested: DB_Error, DB_Warning + +require_once "DB.php"; + +print "testing DB::parseDSN...\n"; +var_dump(DB::parseDSN("mysql")); +var_dump(DB::parseDSN("odbc(mssql)")); +var_dump(DB::parseDSN("mysql://localhost")); +var_dump(DB::parseDSN("mysql://remote.host.com/db")); +var_dump(DB::parseDSN("mysql://testuser:testpw")); +var_dump(DB::parseDSN("oci8://user:pass@tns-name")); +var_dump(DB::parseDSN("")); +var_dump(DB::parseDSN("")); +var_dump(DB::parseDSN("")); +var_dump(DB::parseDSN("")); +var_dump(DB::parseDSN("")); +var_dump(DB::parseDSN("")); +var_dump(DB::parseDSN("")); + +?> +--GET-- +--POST-- +--EXPECT-- +testing ibase: object: db_ibase: (phptype=ibase, dbsyntax=ibase) +testing msql: object: db_msql: (phptype=msql, dbsyntax=msql) +testing mssql: object: db_mssql: (phptype=mssql, dbsyntax=mssql) +testing mysql: object: db_mysql: (phptype=mysql, dbsyntax=mysql) +testing oci8: object: db_oci8: (phptype=oci8, dbsyntax=oci8) +testing odbc: object: db_odbc: (phptype=odbc, dbsyntax=unknown) +testing pgsql: object: db_pgsql: (phptype=pgsql, dbsyntax=pgsql) +testing sybase: object: db_sybase: (phptype=sybase, dbsyntax=sybase) diff --git a/pear/tests/DB_Error.phpt b/pear/tests/DB_Error.phpt new file mode 100644 index 0000000000..b27f0e28f3 --- /dev/null +++ b/pear/tests/DB_Error.phpt @@ -0,0 +1,77 @@ +--TEST-- +DB_Error/DB_Warning test +--SKIPIF-- +<?php if (!include("DB.php")) print "skip"; ?> +--FILE-- +<?php // -*- C++ -*- + +// Test for: DB.php +// Parts tested: DB_Error, DB_Warning + +require_once "DB.php"; + +/* +print "testing DB::parseDSN...\n"; +var_dump(DB::parseDSN("mysql")); +var_dump(DB::parseDSN("odbc(mssql)")); +var_dump(DB::parseDSN("mysql://localhost")); +var_dump(DB::parseDSN("mysql://remote.host.com/db")); +var_dump(DB::parseDSN("mysql://testuser:testpw")); +var_dump(DB::parseDSN("oci8://user:pass@tns-name")); +var_dump(DB::parseDSN("")); +var_dump(DB::parseDSN("")); +var_dump(DB::parseDSN("")); +var_dump(DB::parseDSN("")); +var_dump(DB::parseDSN("")); +var_dump(DB::parseDSN("")); +var_dump(DB::parseDSN("")); +*/ + + +print "testing different error codes...\n"; +$e = new DB_Error(); var_dump($e->toString()); +$e = new DB_Error("test error"); var_dump($e->toString()); +$e = new DB_Error(DB_OK); var_dump($e->toString()); +$e = new DB_Error(DB_ERROR); var_dump($e->toString()); +$e = new DB_Error(DB_ERROR_SYNTAX); var_dump($e->toString()); +$e = new DB_Error(DB_ERROR_DIVZERO); var_dump($e->toString()); +$e = new DB_Warning(); var_dump($e->toString()); +$e = new DB_Warning("test warning"); var_dump($e->toString()); +$e = new DB_Warning(DB_WARNING_READ_ONLY); var_dump($e->toString()); + +ini_alter("html_errors", false); + +print "testing different error modes...\n"; +$e = new DB_Error(DB_ERROR, PEAR_ERROR_PRINT); var_dump($e->toString()); +$e = new DB_Error(DB_ERROR_SYNTAX, PEAR_ERROR_TRIGGER); + +print "testing different error serverities...\n"; +$e = new DB_Error(DB_ERROR_SYNTAX, PEAR_ERROR_TRIGGER, E_USER_NOTICE); +$e = new DB_Error(DB_ERROR_SYNTAX, PEAR_ERROR_TRIGGER, E_USER_WARNING); +$e = new DB_Error(DB_ERROR_SYNTAX, PEAR_ERROR_TRIGGER, E_USER_ERROR); + +?> +--GET-- +--POST-- +--EXPECT-- +testing different error codes... +string(109) "[db_error: message="DB Error: unknown error" code=-1 mode=return level=notice prefix="" prepend="" append=""]" +string(105) "[db_error: message="DB Error: test error" code=0 mode=return level=notice prefix="" prepend="" append=""]" +string(103) "[db_error: message="DB Error: no error" code=0 mode=return level=notice prefix="" prepend="" append=""]" +string(109) "[db_error: message="DB Error: unknown error" code=-1 mode=return level=notice prefix="" prepend="" append=""]" +string(108) "[db_error: message="DB Error: syntax error" code=-2 mode=return level=notice prefix="" prepend="" append=""]" +string(113) "[db_error: message="DB Error: division by zero" code=-13 mode=return level=notice prefix="" prepend="" append=""]" +string(118) "[db_warning: message="DB Warning: unknown warning" code=-1000 mode=return level=notice prefix="" prepend="" append=""]" +string(111) "[db_warning: message="DB Warning: test warning" code=0 mode=return level=notice prefix="" prepend="" append=""]" +string(112) "[db_warning: message="DB Warning: read only" code=-1001 mode=return level=notice prefix="" prepend="" append=""]" +testing different error modes... +DB Error: unknown errorstring(108) "[db_error: message="DB Error: unknown error" code=-1 mode=print level=notice prefix="" prepend="" append=""]" +<br> +<b>Notice</b>: DB Error: syntax error in <b>PEAR.php</b> on line <b>182</b><br> +testing different error serverities... +<br> +<b>Notice</b>: DB Error: syntax error in <b>PEAR.php</b> on line <b>182</b><br> +<br> +<b>Warning</b>: DB Error: syntax error in <b>PEAR.php</b> on line <b>182</b><br> +<br> +<b>Fatal error</b>: DB Error: syntax error in <b>PEAR.php</b> on line <b>182</b><br> diff --git a/run-tests.php b/run-tests.php new file mode 100755 index 0000000000..b80c4b72b3 --- /dev/null +++ b/run-tests.php @@ -0,0 +1,427 @@ +<?php + +define('TEST_PASSED', 0); +define('TEST_FAILED', -1); +define('TEST_SKIPPED', -2); +define('TEST_INTERNAL_ERROR', -3); + +initialize(); +$opts = parse_options(&$argc, &$argv); +if ($opts['help']) { + usage(); + exit; +} +do_testing($argc, &$argv); + +exit; + +/*****************************************************************************/ + +function usage() { + writeln("Usage: run-tests.php [-d] [-h] [dir|file...]"); +} + +/* + * Please use write() and writeln() for all screen output. + * This makes it easier to convert to HTML output later. + */ + +function write($str) { + global $term_bold, $term_norm; + $str = str_replace("%b", $term_bold, $str); + $str = str_replace("%B", $term_norm, $str); + print $str; +} + +function writeln($str) { + write("$str\n"); +} + +function initialize() { + global $term, $windows_p, $php, $skip, $testdirs, $tmpfile, + $skipped, $failed, $passed, $total, $term_bold, $term_norm, + $tests_in_dir; + + // XXX Should support HTML output as well. + $term = getenv("TERM"); + if (preg_match('/^(xterm|vt220)/', $term)) { + $term_bold = sprintf("%c%c%c%c", 27, 91, 49, 109); + $term_norm = sprintf("%c%c%c", 27, 91, 109); + } elseif (preg_match('/^vt100/', $term)) { + $term_bold = sprintf("%c%c%c%c", 27, 91, 49, 109); + $term_norm = sprintf("%c%c%c", 27, 91, 109); + } else { + $term_bold = $term_norm = ""; + } + + $windows_p = (substr(php_uname(), 0, 7) == "Windows"); + if ($windows_p) { + $php = "./php.exe"; + } else { + $php = "./php"; + } + + if (!is_executable($php)) { + writeln("PHP CGI binary ($php) not executable."); + writeln("Please compile PHP as a CGI executable and try again."); + exit; + } + + $skip = array( + "CVS" => 1 + ); + $testdirs = array(); + $tmpfile = array(); + $tests_in_dir = array(); + + register_shutdown_function("delete_tmpfiles"); + + $skipped = $failed = $passed = $total = 0; +} + +function &parse_options(&$argc, &$argv) { + $options = array(); + while ($argc > 0 && ($opt = substr($argv[0], 0, 2)) == "--") { + $opt = array_shift($argv); + $argc--; + if ($arg == "--") { + return $options; + } + if (preg_match('/^--([^=]+)=(.*)$/', $opt, $matches)) { + $opt = $matches[1]; + $arg = $matches[2]; + } else { + $arg = true; + } + $options[$opt] = $arg; + } + return $options; +} + +function do_testing($argc, $argv) { + global $term, $windows_p, $php, $skip, $testdirs, $tmpfile, $opts, + $skipped, $failed, $passed, $total, $term_bold, $term_norm; + + if ($argc > 0) { + if (is_dir($argv[0])) { + $dir = $argv[0]; + } else { + for ($i = 0; $i < $argc; $i++) { + switch (run_test($argv[$i])) { + case TEST_SKIPPED: + case TEST_INTERNAL_ERROR: + $skipped++; + break; + case TEST_FAILED: + $failed++; + break; + case TEST_PASSED: + $passed++; + break; + } + $total++; + } + } + } else { + $dir = "."; + } + + if ($dir) { + find_testdirs($dir); + for ($i = 0; $i < sizeof($testdirs); $i++) { + run_tests_in_dir($testdirs[$i]); + } + } + + if ($total == 0) { + writeln("No tests were run."); + return; + } + + $total_d = (double)$total; + $passed_p = 100 * ($passed / $total_d); + $failed_p = 100 * ($failed / $total_d); + $skipped_p = 100 * ($skipped / $total_d); + $passed_pstr = sprintf($passed_p < 10.0 ? "%1.1f" : "%3.0f", $passed_p); + $failed_pstr = sprintf($failed_p < 10.0 ? "%1.1f" : "%3.0f", $failed_p); + $skipped_pstr = sprintf($skipped_p < 10.0 ? "%1.1f" : "%3.0f", $skipped_p); + + writeln("TEST RESULT SUMMARY"); + writeln("============================="); + writeln(sprintf("Number of tests: %4d", $total)); + writeln(sprintf("Tests skipped: %4d (%s%%)", $skipped, $skipped_pstr)); + writeln(sprintf("Tests failed: %4d (%s%%)", $failed, $failed_pstr)); + writeln(sprintf("Tests passed: %4d (%s%%)", $passed, $passed_pstr)); +} + +function find_testdirs($dir = '.', $first_pass = true) { + global $testdirs, $skip; + + if ($first_pass && is_dir($dir)) { + $testdirs[] = $dir; + } + $dp = @opendir($dir); + if (!$dp) { + print "Warning: could not open directory $dir\n"; + return false; + } + while ($ent = readdir($dp)) { + $path = "$dir/$ent"; + if ($skip[$ent] || substr($ent, 0, 1) == "." || !is_dir($path)) { + continue; + } + if (strstr("/$path/", "/tests/")) { + $testdirs[] = $path; + } + find_testdirs($path, false); + } + closedir($dp); +} + +function run_tests_in_dir($dir = '.') { + global $skip, $skipped, $failed, $passed, $total, $opts, $tests_in_dir; + $dp = opendir($dir); + if (!$dp) { + print "Warning: could not run tests in $dir\n"; + return false; + } + $testfiles = array(); + while ($ent = readdir($dp)) { + if ($skip[$ent] || substr($ent, 0, 1) == "." || substr($ent, -5) != ".phpt") { + continue; + } + $testfiles[] = "$dir/$ent"; + $tests_in_dir[$dir]++; + } + closedir($dp); + if ($tests_in_dir[$dir] == 0) { + return true; + } + $oskipped = $skipped; + writeln("%bRunning tests in $dir%B"); + writeln("=================".str_repeat("=", strlen($dir))); + sort($testfiles); + for ($i = 0; $i < sizeof($testfiles); $i++) { + switch (run_test($testfiles[$i])) { + case TEST_SKIPPED: + case TEST_INTERNAL_ERROR: + $skipped++; + break; + case TEST_FAILED: + $failed++; + break; + case TEST_PASSED: + $passed++; + break; + } + $total++; + } + if ($oskipped + $tests_in_dir[$dir] == $skipped) { + writeln("(all skipped)"); + } + writeln(""); + return true; +} + +function skip_headers($fp) { + while (!feof($fp)) { + if (trim(fgets($fp, 1024)) == "") { + break; + } + } +} + +function delete_tmpfiles() { + global $tmpfile; + reset($tmpfile); + while (list($k, $v) = each($tmpfile)) { + if (file_exists($v)) { + //print "unlink($v): "; var_dump(unlink($v)); + unlink($v); + } + } +} + +/** + * Compares two files, ignoring blank lines. + * + * @param $file1 string name of first file to compare + * @param $file2 string name of second file to compare + * + * @return bool whether the files were "equal" + */ +function compare_results($file1, $file2) { + if (!($fp1 = @fopen($file1, "r")) || !($fp2 = @fopen($file2, "r"))) { + return false; + } + while (!(feof($fp1) || feof($fp2))) { + if (!feof($fp1) && trim($line1 = fgets($fp1, 10240)) != "") { + $data1 .= $line1; + } + if (!feof($fp2) && trim($line2 = fgets($fp2, 10240)) != "") { + $data2 .= $line2; + } + } + fclose($fp1); + fclose($fp2); + if (trim($data1) != trim($data2)) { + //print "data1=";var_dump($data1); + //print "data2=";var_dump($data2); + return false; + } + return true; +} + +function run_test($file) { + global $php, $tmpfile, $term_bold, $term_norm; + + $variables = array("TEST", "POST", "GET", "FILE", "EXPECT", "SKIPIF", + "OUTPUT"); + $fp = @fopen($file, "r"); + if (!$fp) { + return TEST_INTERNAL_ERROR; + } + $tmpdir = dirname($file); + $tmpfix = "phpt."; + $tmpfile["FILE"] = tempnam($tmpdir, $tmpfix); + $tmpfile["SKIPIF"] = tempnam($tmpdir, $tmpfix); + $tmpfile["POST"] = tempnam($tmpdir, $tmpfix); + $tmpfile["EXPECT"] = tempnam($tmpdir, $tmpfix); + $tmpfile["OUTPUT"] = tempnam($tmpdir, $tmpfix); + + while ($line = fgets($fp, 4096)) { + if (preg_match('/^--([A-Z]+)--$/', $line, $matches)) { + $var = $matches[1]; + if ($tmpfile[$var]) { + $fps[$var] = @fopen($tmpfile[$var], "w"); + } else { + $$var = ''; + } + } else { + if ($var) { + if ($var == "POST") { + $line = trim($line); + } + if ($fps[$var]) { + fwrite($fps[$var], $line); + } else { + $$var .= $line; + } + } + } + } + reset($fps); + while (list($k, $v) = each($fps)) { + if (is_resource($v)) { + fclose($v); + } + } + putenv("PHP_TEST=1"); + putenv("REDIRECT_STATUS=1"); + putenv("CONTENT_LENGTH="); + putenv("QUERY_STRING=$GET"); + if (isset($fps["SKIPIF"])) { + $tmpfile["SKIPIF_OUTPUT"] = tempnam($tmpdir, $tmpfix); + putenv("REQUEST_METHOD=GET"); + putenv("CONTENT_TYPE="); + putenv("PATH_TRANSLATED=$tmpfile[SKIPIF]"); + putenv("SCRIPT_FILENAME=$tmpfile[SKIPIF]"); + $skipifcmd = "$php -q -f $tmpfile[SKIPIF] > $tmpfile[SKIPIF_OUTPUT]"; + system($skipifcmd, $ret); + $sp = @fopen($tmpfile["SKIPIF_OUTPUT"], "r"); + if ($sp) { + skip_headers($sp); + $skip = trim(fgets($sp, 1024)); + fclose($sp); + if ($skip == "skip") { + delete_tmpfiles(); + return TEST_SKIPPED; + } + } + } + putenv("PATH_TRANSLATED=$tmpfile[FILE]"); + putenv("SCRIPT_FILENAME=$tmpfile[FILE]"); + if (isset($fps["POST"])) { + putenv("REQUEST_METHOD=POST"); + putenv("CONTENT_TYPE=application/x-www-form-urlencoded"); + putenv("CONTENT_LENGTH=".filesize($tmpfile["POST"])); + } else { + putenv("REQUEST_METHOD=GET"); + putenv("CONTENT_TYPE="); + putenv("CONTENT_LENGTH="); + } + putenv("a="); + putenv("b="); + putenv("c="); + putenv("d="); + $cmd = "$php -f $tmpfile[FILE] < $tmpfile[POST]"; + $ofp = @fopen($tmpfile["OUTPUT"], "w"); + if (!$ofp) { + writeln("Error: could not write to output file"); + delete_tmpfiles(); + return TEST_INTERNAL_ERROR; + } + $cp = popen($cmd, "r"); + if (!$cp) { + writeln("Error: could not execute: $cmd"); + delete_tmpfiles(); + return TEST_INTERNAL_ERROR; + } + skip_headers($cp); + while ($data = fread($cp, 2048)) { + fwrite($ofp, $data); + } + fclose($ofp); + pclose($cp); + $desc = trim($TEST); + $outfile = preg_replace('/\.phpt$/', '.out', $file); + $expectfile = preg_replace('/\.phpt$/', '.exp', $file); + $phpfile = preg_replace('/\.phpt$/', '.php', $file); + if (compare_results($tmpfile["OUTPUT"], $tmpfile["EXPECT"])) { + $status = TEST_PASSED; + $text = "passed"; + $pre = $post = ""; + if (file_exists($outfile)) { + unlink($outfile); + } + if (file_exists($expectfile)) { + unlink($expectfile); + } + if (file_exists($phpfile)) { + unlink($phpfile); + } + } else { + //system("env"); + $status = TEST_FAILED; + $text = "failed"; + $pre = $term_bold; + $post = $term_norm; + $desc .= " (".basename($file).")"; + if (file_exists($outfile)) { + unlink($outfile); + } + copy($tmpfile["OUTPUT"], $outfile); + copy($tmpfile["EXPECT"], $expectfile); + copy($tmpfile["FILE"], $phpfile); + } + writeln(sprintf("%s%-68s ... %s%s", $pre, substr($desc, 0, 68), + $text, $post)); +// if ($status == TEST_FAILED) { +// for ($i = 0; $i < sizeof($variables); $i++) { +// $var = $variables[$i]; +// print "$var:\n"; +// if ($tmpfile[$var]) { +// if (file_exists($tmpfile[$var])) { +// system("cat ".$tmpfile[$var]); +// } +// } else { +// print $$var; +// } +// } +// print "--\n\n"; +// } + delete_tmpfiles(); + return $status; +} + +?> diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 6e5ae10467..6b57cffba4 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -391,12 +391,14 @@ int main(int argc, char *argv[]) #endif -#if HAVE_SIGNAL_H +#ifdef HAVE_SIGNAL_H #if defined(SIGPIPE) && defined(SIG_IGN) - signal(SIGPIPE,SIG_IGN); /* ignore SIGPIPE in standalone mode so that sockets created via - fsockopen() don't kill PHP if the remote site closes it. - in apache|apxs mode apache does that for us! - thies@digicol.de 20000419 */ + signal(SIGPIPE,SIG_IGN); /* ignore SIGPIPE in standalone mode so + that sockets created via fsockopen() + don't kill PHP if the remote site + closes it. in apache|apxs mode apache + does that for us! thies@digicol.de + 20000419 */ #endif #endif @@ -754,3 +756,9 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine return exit_status; } +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + */ diff --git a/tests/README b/tests/README new file mode 100755 index 0000000000..b9b0622ecf --- /dev/null +++ b/tests/README @@ -0,0 +1,60 @@ +PHP Regression Tests +==================== + +To run the tests, go to the top-level directory and +run "./php -f run-tests.php". + +Without parameters, "run-tests.php" will recursively scan through the +file tree looking for directories called "tests", and run all the +tests (.phpt files) within (recursively). + +To run tests in a single directory, pass the directory as a parameter: +"./php -f run-tests.php tests/lang". + +To run one or more single tests, pass them as parameters: +"./php -f run-tests.php tests/lang/015.phpt". + +The format of the .phpt files is quite simple. There are 6 possible +sections. Test, Skipif, Post, Get, File and Expect. The Test section +contains the description of the test. The Skipif section contains +code that should print "skip" if this test should be skipped for some +reason (such as an extension that is not compiled in). The Post +section contains any post data that the script might need. The Get +section contains any Get data. Note that both the Post and the Get +sections need to have this data in url-encoded format. The File +section contains the actual script and the Expect section is the +expected output, sans headers. Blank lines are ignored in the +expected output. + +A simple example which takes one argument through the POST method +and one through the GET and displays these would be: + +--TEST-- +Simple GET and POST test +--SKIPIF-- +--POST-- +a=Hello +--GET-- +b=There +--FILE-- +<?php echo "$a $b"> +--EXPECT-- +Hello There + +Another simple example that only runs if the PCRE extension is loaded: + +--TEST-- +Simple Perl regexp test +--SKIPIF-- +<?php if (!extension_loaded("pcre")) print "skip"; ?> +--POST-- +--GET-- +--FILE-- +<?php +$str="Hello 42 World"; +if (pcre_match('/^([a-z]+)\s+(\d+)\s+([a-z]+)/i', $str, $matches)) { + printf("%s %s: %d\n", $matches[1], $matches[3], $matches[2]); +} +?> +--EXPECT-- +Hello World: 42 diff --git a/tests/basic/001.phpt b/tests/basic/001.phpt new file mode 100644 index 0000000000..4cc79613c5 --- /dev/null +++ b/tests/basic/001.phpt @@ -0,0 +1,8 @@ +--TEST-- +Trivial "Hello World" test +--POST-- +--GET-- +--FILE-- +<?php echo "Hello World"?> +--EXPECT-- +Hello World diff --git a/tests/basic/002.phpt b/tests/basic/002.phpt new file mode 100644 index 0000000000..d694a201c2 --- /dev/null +++ b/tests/basic/002.phpt @@ -0,0 +1,10 @@ +--TEST-- +Simple POST Method test +--POST-- +a=Hello+World +--GET-- +--FILE-- +<?php error_reporting(0); +echo $a?> +--EXPECT-- +Hello World diff --git a/tests/basic/003.phpt b/tests/basic/003.phpt new file mode 100644 index 0000000000..c728a79efd --- /dev/null +++ b/tests/basic/003.phpt @@ -0,0 +1,12 @@ +--TEST-- +GET and POST Method combined +--POST-- +a=Hello+World +--GET-- +b=Hello+Again+World&c=Hi+Mom +--FILE-- +<?php +error_reporting(0); +echo "$a $b $c"?> +--EXPECT-- +Hello World Hello Again World Hi Mom diff --git a/tests/basic/004.phpt b/tests/basic/004.phpt new file mode 100644 index 0000000000..4e8eb2b2c0 --- /dev/null +++ b/tests/basic/004.phpt @@ -0,0 +1,11 @@ +--TEST-- +Two variables in POST data +--POST-- +a=Hello+World&b=Hello+Again+World +--GET-- +--FILE-- +<?php +error_reporting(0); +echo "$a $b"?> +--EXPECT-- +Hello World Hello Again World diff --git a/tests/basic/005.phpt b/tests/basic/005.phpt new file mode 100644 index 0000000000..9a30c59194 --- /dev/null +++ b/tests/basic/005.phpt @@ -0,0 +1,11 @@ +--TEST-- +Three variables in POST data +--POST-- +a=Hello+World&b=Hello+Again+World&c=1 +--GET-- +--FILE-- +<?php +error_reporting(0); +echo "$a $b $c"?> +--EXPECT-- +Hello World Hello Again World 1 diff --git a/tests/basic/006.phpt b/tests/basic/006.phpt new file mode 100644 index 0000000000..3b88acc32f --- /dev/null +++ b/tests/basic/006.phpt @@ -0,0 +1,8 @@ +--TEST-- +Add 3 variables together and print result +--POST-- +--GET-- +--FILE-- +<?php $a=1; $b=2; $c=3; $d=$a+$b+$c; echo $d?> +--EXPECT-- +6 diff --git a/tests/basic/007.phpt b/tests/basic/007.phpt new file mode 100644 index 0000000000..90fdc7e545 --- /dev/null +++ b/tests/basic/007.phpt @@ -0,0 +1,8 @@ +--TEST-- +Multiply 3 variables and print result +--POST-- +--GET-- +--FILE-- +<?php $a=2; $b=4; $c=8; $d=$a*$b*$c; echo $d?> +--EXPECT-- +64 diff --git a/tests/basic/008.phpt b/tests/basic/008.phpt new file mode 100644 index 0000000000..927bf0e509 --- /dev/null +++ b/tests/basic/008.phpt @@ -0,0 +1,8 @@ +--TEST-- +Divide 3 variables and print result +--POST-- +--GET-- +--FILE-- +<?php $a=27; $b=3; $c=3; $d=$a/$b/$c; echo $d?> +--EXPECT-- +3 diff --git a/tests/basic/009.phpt b/tests/basic/009.phpt new file mode 100644 index 0000000000..d78b195d0b --- /dev/null +++ b/tests/basic/009.phpt @@ -0,0 +1,8 @@ +--TEST-- +Subtract 3 variables and print result +--POST-- +--GET-- +--FILE-- +<?php $a=27; $b=7; $c=10; $d=$a-$b-$c; echo $d?> +--EXPECT-- +10 diff --git a/tests/basic/010.phpt b/tests/basic/010.phpt new file mode 100644 index 0000000000..4440d99bf8 --- /dev/null +++ b/tests/basic/010.phpt @@ -0,0 +1,8 @@ +--TEST-- +Testing | and & operators +--POST-- +--GET-- +--FILE-- +<?php $a=8; $b=4; $c=8; echo $a|$b&$c?> +--EXPECT-- +8 diff --git a/tests/basic/011.phpt b/tests/basic/011.phpt new file mode 100644 index 0000000000..7c2d395b9d --- /dev/null +++ b/tests/basic/011.phpt @@ -0,0 +1,17 @@ +--TEST-- +Testing $argc and $argv handling +--POST-- +--GET-- +ab+cd+ef+123+test +--FILE-- +<?php + for($i=0;$i<$argc;$i++) { + echo "$i: ".$argv[$i]."\n"; + } +?> +--EXPECT-- +0: ab +1: cd +2: ef +3: 123 +4: test diff --git a/tests/classes/class_example.phpt b/tests/classes/class_example.phpt new file mode 100644 index 0000000000..788232058e --- /dev/null +++ b/tests/classes/class_example.phpt @@ -0,0 +1,87 @@ +--TEST-- +Classes general test +--POST-- +--GET-- +--FILE-- + +<?php + +/* pretty nifty object oriented code! */ + +class user { + var $first_name,$family_name,$address,$phone_num; + cfunction display() + { + echo "User information\n"; + echo "----------------\n\n"; + echo "First name:\t ".$this->first_name."\n"; + echo "Family name:\t ".$this->family_name."\n"; + echo "Address:\t ".$this->address."\n"; + echo "Phone:\t\t ".$this->phone_num."\n"; + echo "\n\n"; + } + cfunction initialize($first_name,$family_name,$address,$phone_num) + { + $this->first_name = $first_name; + $this->family_name = $family_name; + $this->address = $address; + $this->phone_num = $phone_num; + } +}; + + +function test($u) +{ /* one can pass classes as arguments */ + $u->display(); + $t = $u; + $t->address = "New address..."; + return $t; /* and also return them as return values */ +} + +$user1 = new user; +$user2 = new user; + +$user1->initialize("Zeev","Suraski","Ben Gourion 3, Kiryat Bialik, Israel","+972-4-8713139"); +$user2->initialize("Andi","Gutmans","Haifa, Israel","+972-4-8231621"); +$user1->display(); +$user2->display(); + +$tmp = test($user2); +$tmp->display(); + +?> +--EXPECT-- +User information +---------------- + +First name: Zeev +Family name: Suraski +Address: Ben Gourion 3, Kiryat Bialik, Israel +Phone: +972-4-8713139 + + +User information +---------------- + +First name: Andi +Family name: Gutmans +Address: Haifa, Israel +Phone: +972-4-8231621 + + +User information +---------------- + +First name: Andi +Family name: Gutmans +Address: Haifa, Israel +Phone: +972-4-8231621 + + +User information +---------------- + +First name: Andi +Family name: Gutmans +Address: New address... +Phone: +972-4-8231621 diff --git a/tests/classes/inheritance.phpt b/tests/classes/inheritance.phpt new file mode 100644 index 0000000000..45aafab7de --- /dev/null +++ b/tests/classes/inheritance.phpt @@ -0,0 +1,58 @@ +--TEST-- +Classes inheritance test +--POST-- +--GET-- +--FILE-- +<?php + +/* Inheritance test. Pretty nifty if I do say so myself! */ + +class foo { + var $a; + var $b; + cfunction display() { + echo "This is class foo\n"; + echo "a = ".$this->a."\n"; + echo "b = ".$this->b."\n"; + } + cfunction mul() { + return $this->a*$this->b; + } +}; + +class bar extends foo { + var $c; + cfunction display() { /* alternative display function for class bar */ + echo "This is class bar\n"; + echo "a = ".$this->a."\n"; + echo "b = ".$this->b."\n"; + echo "c = ".$this->c."\n"; + } +}; + + +$foo1 = new foo; +$foo1->a = 2; +$foo1->b = 5; +$foo1->display(); +echo $foo1->mul()."\n"; + +echo "-----\n"; + +$bar1 = new bar; +$bar1->a = 4; +$bar1->b = 3; +$bar1->c = 12; +$bar1->display(); +echo $bar1->mul()."\n"; +--EXPECT-- +This is class foo +a = 2 +b = 5 +10 +----- +This is class bar +a = 4 +b = 3 +c = 12 +12 diff --git a/tests/func/001.phpt b/tests/func/001.phpt new file mode 100644 index 0000000000..c5553cd8a8 --- /dev/null +++ b/tests/func/001.phpt @@ -0,0 +1,8 @@ +--TEST-- +Strlen() function test +--POST-- +--GET-- +--FILE-- +<?php echo strlen("abcdef")?> +--EXPECT-- +6 diff --git a/tests/func/002.phpt b/tests/func/002.phpt new file mode 100644 index 0000000000..aa752ee13c --- /dev/null +++ b/tests/func/002.phpt @@ -0,0 +1,22 @@ +--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 diff --git a/tests/func/003.phpt b/tests/func/003.phpt new file mode 100644 index 0000000000..6f21a34a42 --- /dev/null +++ b/tests/func/003.phpt @@ -0,0 +1,289 @@ +--TEST-- +General function test +--POST-- +--GET-- +--FILE-- +<?php + +old_function a ( + echo "hey\n"; +); + +function b($i) +{ + echo "$i\n"; +} + + +function c($i,$j) +{ + echo "Counting from $i to $j\n"; + for ($k=$i; $k<=$j; $k++) { + echo "$k\n"; + } +} + + + +a(); +b("blah"); +a(); +b("blah","blah"); +c(7,14); + +a(); + + +old_function factorial $n ( + if ($n==0 || $n==1) { + return 1; + } else { + return factorial($n-1)*$n; + } +); + + +function factorial2($start, $n) +{ + if ($n<=$start) { + return $start; + } else { + return factorial2($start,$n-1)*$n; + } +} + + +for ($k=0; $k<10; $k++) { + for ($i=0; $i<=10; $i++) { + $n=factorial($i); + echo "factorial($i) = $n\n"; + } +} + + +echo "and now, from a function...\n"; + +old_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; ); + +for ($k=0; $k<10; $k++) { + call_fact(); +} + +echo "------\n"; +$result = factorial(factorial(3)); +echo "$result\n"; + +$result=factorial2(return4(),return7()); +echo "$result\n"; + +old_function andi $i, $j ( + for ($k=$i ; $k<=$j ; $k++) { + if ($k >5) continue; + echo "$k\n"; + } +); + +andi (3,10); +--EXPECT-- +hey +blah +hey +blah +Counting from 7 to 14 +7 +8 +9 +10 +11 +12 +13 +14 +hey +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +factorial(5) = 120 +factorial(6) = 720 +factorial(7) = 5040 +factorial(8) = 40320 +factorial(9) = 362880 +factorial(10) = 3628800 +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +factorial(5) = 120 +factorial(6) = 720 +factorial(7) = 5040 +factorial(8) = 40320 +factorial(9) = 362880 +factorial(10) = 3628800 +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +factorial(5) = 120 +factorial(6) = 720 +factorial(7) = 5040 +factorial(8) = 40320 +factorial(9) = 362880 +factorial(10) = 3628800 +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +factorial(5) = 120 +factorial(6) = 720 +factorial(7) = 5040 +factorial(8) = 40320 +factorial(9) = 362880 +factorial(10) = 3628800 +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +factorial(5) = 120 +factorial(6) = 720 +factorial(7) = 5040 +factorial(8) = 40320 +factorial(9) = 362880 +factorial(10) = 3628800 +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +factorial(5) = 120 +factorial(6) = 720 +factorial(7) = 5040 +factorial(8) = 40320 +factorial(9) = 362880 +factorial(10) = 3628800 +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +factorial(5) = 120 +factorial(6) = 720 +factorial(7) = 5040 +factorial(8) = 40320 +factorial(9) = 362880 +factorial(10) = 3628800 +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +factorial(5) = 120 +factorial(6) = 720 +factorial(7) = 5040 +factorial(8) = 40320 +factorial(9) = 362880 +factorial(10) = 3628800 +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +factorial(5) = 120 +factorial(6) = 720 +factorial(7) = 5040 +factorial(8) = 40320 +factorial(9) = 362880 +factorial(10) = 3628800 +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +factorial(5) = 120 +factorial(6) = 720 +factorial(7) = 5040 +factorial(8) = 40320 +factorial(9) = 362880 +factorial(10) = 3628800 +and now, from a function... +(it should break at 5...) +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +(it should break at 5...) +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +(it should break at 5...) +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +(it should break at 5...) +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +(it should break at 5...) +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +(it should break at 5...) +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +(it should break at 5...) +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +(it should break at 5...) +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +(it should break at 5...) +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +(it should break at 5...) +factorial(0) = 1 +factorial(1) = 1 +factorial(2) = 2 +factorial(3) = 6 +factorial(4) = 24 +------ +720 +840 +3 +4 +5 + diff --git a/tests/func/004.phpt b/tests/func/004.phpt new file mode 100644 index 0000000000..465cb5d2a1 --- /dev/null +++ b/tests/func/004.phpt @@ -0,0 +1,65 @@ +--TEST-- +General function test +--POST-- +--GET-- +--FILE-- +<?php + +echo "Before function declaration...\n"; + +old_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 ( + echo "This is some other function, to ensure more than just one function works fine...\n"; +); + + +echo "After function declaration...\n"; + +echo "Calling function for the first time...\n"; +print_something_multiple_times("This works!",10); +echo "Returned from function call...\n"; + +echo "Calling the function for the second time...\n"; +print_something_multiple_times("This like, really works and stuff...",3); +echo "Returned from function call...\n"; + +some_other_function(); + +?> +--EXPECT-- + +Before function declaration... +After function declaration... +Calling function for the first time... +---- +In function, printing the string "This works!" 10 times +0) This works! +1) This works! +2) This works! +3) This works! +4) This works! +5) This works! +6) This works! +7) This works! +8) This works! +9) This works! +Done with function... +----- +Returned from function call... +Calling the function for the second time... +---- +In function, printing the string "This like, really works and stuff..." 3 times +0) This like, really works and stuff... +1) This like, really works and stuff... +2) This like, really works and stuff... +Done with function... +----- +Returned from function call... +This is some other function, to ensure more than just one function works fine... diff --git a/tests/func/005.phpt b/tests/func/005.phpt new file mode 100644 index 0000000000..4a20786df0 --- /dev/null +++ b/tests/func/005.phpt @@ -0,0 +1,22 @@ +--TEST-- +Testing register_shutdown_function() +--POST-- +--GET-- +ab+cd+ef+123+test +--FILE-- +<?php + +function foo() +{ + print "foo"; +} + +register_shutdown_function("foo"); + +print "foo() will be called on shutdown...\n"; + +?> +--EXPECT-- +foo() will be called on shutdown... +foo + diff --git a/tests/lang/001.phpt b/tests/lang/001.phpt new file mode 100644 index 0000000000..d90e9b8d3d --- /dev/null +++ b/tests/lang/001.phpt @@ -0,0 +1,8 @@ +--TEST-- +Simple If condition test +--POST-- +--GET-- +--FILE-- +<?php $a=1; if($a>0) { echo "Yes"; } ?> +--EXPECT-- +Yes diff --git a/tests/lang/002.phpt b/tests/lang/002.phpt new file mode 100644 index 0000000000..9197a9762b --- /dev/null +++ b/tests/lang/002.phpt @@ -0,0 +1,12 @@ +--TEST-- +Simple While Loop Test +--POST-- +--GET-- +--FILE-- +<?php $a=1; + while($a<10): + echo $a; + $a++; + endwhile?> +--EXPECT-- +123456789 diff --git a/tests/lang/003.phpt b/tests/lang/003.phpt new file mode 100644 index 0000000000..23bc99e9f4 --- /dev/null +++ b/tests/lang/003.phpt @@ -0,0 +1,19 @@ +--TEST-- +Simple Switch Test +--POST-- +--GET-- +--FILE-- +<?php $a=1; + switch($a): + case 0; + echo "bad"; + break; + case 1; + echo "good"; + break; + default; + echo "bad"; + break; + endswitch?> +--EXPECT-- +good diff --git a/tests/lang/004.phpt b/tests/lang/004.phpt new file mode 100644 index 0000000000..be1f98ade5 --- /dev/null +++ b/tests/lang/004.phpt @@ -0,0 +1,13 @@ +--TEST-- +Simple If/Else Test +--POST-- +--GET-- +--FILE-- +<?php $a=1; + if($a==0): + echo "bad"; + else: + echo "good"; + endif?> +--EXPECT-- +good diff --git a/tests/lang/005.phpt b/tests/lang/005.phpt new file mode 100644 index 0000000000..ea413769b0 --- /dev/null +++ b/tests/lang/005.phpt @@ -0,0 +1,15 @@ +--TEST-- +Simple If/ElseIf/Else Test +--POST-- +--GET-- +--FILE-- +<?php $a=1; + if($a==0): + echo "bad"; + elseif($a==3): + echo "bad"; + else: + echo "good"; + endif?> +--EXPECT-- +good diff --git a/tests/lang/006.phpt b/tests/lang/006.phpt new file mode 100644 index 0000000000..b0cc9cf0e2 --- /dev/null +++ b/tests/lang/006.phpt @@ -0,0 +1,21 @@ +--TEST-- +Nested If/ElseIf/Else Test +--POST-- +--GET-- +--FILE-- +<?php $a=1; $b=2; + if($a==0): + echo "bad"; + elseif($a==3): + echo "bad"; + else: + if($b==1): + echo "bad"; + elseif($b==2): + echo "good"; + else: + echo "bad"; + endif; + endif?> +--EXPECT-- +good diff --git a/tests/lang/007.phpt b/tests/lang/007.phpt new file mode 100644 index 0000000000..f0aa61f876 --- /dev/null +++ b/tests/lang/007.phpt @@ -0,0 +1,25 @@ +--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 diff --git a/tests/lang/008.phpt b/tests/lang/008.phpt new file mode 100644 index 0000000000..145214cbb4 --- /dev/null +++ b/tests/lang/008.phpt @@ -0,0 +1,16 @@ +--TEST-- +Testing recursive function +--POST-- +--GET-- +--FILE-- +<?php Function Test() + { + static $a=1; + + echo "$a "; + $a++; + if($a<10): Test(); endif; + } + Test()?> +--EXPECT-- +1 2 3 4 5 6 7 8 9 diff --git a/tests/lang/009.phpt b/tests/lang/009.phpt new file mode 100644 index 0000000000..5498288dcf --- /dev/null +++ b/tests/lang/009.phpt @@ -0,0 +1,11 @@ +--TEST-- +Testing function parameter passing +--POST-- +--GET-- +--FILE-- +<?php old_function Test $a,$b ( + echo $a+$b; + ); + Test(1,2)?> +--EXPECT-- +3 diff --git a/tests/lang/010.phpt b/tests/lang/010.phpt new file mode 100644 index 0000000000..03def4b112 --- /dev/null +++ b/tests/lang/010.phpt @@ -0,0 +1,13 @@ +--TEST-- +Testing function parameter passing with a return value +--POST-- +--GET-- +--FILE-- +<?php old_function Test $b ( + $b++; + return($b); + ); + $a = Test(1); + echo $a?> +--EXPECT-- +2 diff --git a/tests/lang/011.phpt b/tests/lang/011.phpt new file mode 100644 index 0000000000..e648623845 --- /dev/null +++ b/tests/lang/011.phpt @@ -0,0 +1,25 @@ +--TEST-- +Testing nested functions +--POST-- +--GET-- +--FILE-- +<?php +function F() +{ + $a = "Hello "; + return($a); +} + +function G() +{ + static $myvar = 4; + + echo "$myvar "; + echo F(); + echo "$myvar"; +} + +G(); +?> +--EXPECT-- +4 Hello 4 diff --git a/tests/lang/012.phpt b/tests/lang/012.phpt new file mode 100644 index 0000000000..b3c7abbfda --- /dev/null +++ b/tests/lang/012.phpt @@ -0,0 +1,20 @@ +--TEST-- +Testing stack after early function return +--POST-- +--GET-- +--FILE-- +<?php +old_function F ( + if(1): + return("Hello"); + endif; +); + +$i=0; +while($i<2): + echo F(); + $i++; +endwhile; +?> +--EXPECT-- +HelloHello diff --git a/tests/lang/013.phpt b/tests/lang/013.phpt new file mode 100644 index 0000000000..74a8f197f1 --- /dev/null +++ b/tests/lang/013.phpt @@ -0,0 +1,12 @@ +--TEST-- +Testing eval function +--POST-- +--GET-- +--FILE-- +<?php + error_reporting(0); + $a="echo \"Hello\";"; + eval($a); +?> +--EXPECT-- +Hello diff --git a/tests/lang/014.phpt b/tests/lang/014.phpt new file mode 100644 index 0000000000..a03aa47870 --- /dev/null +++ b/tests/lang/014.phpt @@ -0,0 +1,15 @@ +--TEST-- +Testing eval function inside user-defined function +--POST-- +--GET-- +--FILE-- +<?php +old_function F $a ( + eval($a); +); + +error_reporting(0); +F("echo \"Hello\";"); +?> +--EXPECT-- +Hello diff --git a/tests/lang/015.inc b/tests/lang/015.inc new file mode 100755 index 0000000000..d436a7bb14 --- /dev/null +++ b/tests/lang/015.inc @@ -0,0 +1,3 @@ +<?php + echo "Hello"; +?> diff --git a/tests/lang/015.phpt b/tests/lang/015.phpt new file mode 100644 index 0000000000..e6376067cd --- /dev/null +++ b/tests/lang/015.phpt @@ -0,0 +1,10 @@ +--TEST-- +Testing include +--POST-- +--GET-- +--FILE-- +<?php + include "015.inc"; +?> +--EXPECT-- +Hello diff --git a/tests/lang/016.inc b/tests/lang/016.inc new file mode 100755 index 0000000000..7039e3f395 --- /dev/null +++ b/tests/lang/016.inc @@ -0,0 +1,5 @@ +<?php + old_function MyFunc $a ( + echo $a; + ); +?> diff --git a/tests/lang/016.phpt b/tests/lang/016.phpt new file mode 100644 index 0000000000..238fc29a61 --- /dev/null +++ b/tests/lang/016.phpt @@ -0,0 +1,11 @@ +--TEST-- +Testing user-defined function in included file +--POST-- +--GET-- +--FILE-- +<?php + include "016.inc"; + MyFunc("Hello"); +?> +--EXPECT-- +Hello diff --git a/tests/lang/017.phpt b/tests/lang/017.phpt new file mode 100644 index 0000000000..1fc8429a82 --- /dev/null +++ b/tests/lang/017.phpt @@ -0,0 +1,18 @@ +--TEST-- +Testing user-defined function falling out of an If into another +--POST-- +--GET-- +--FILE-- +<?php $a = 1; +old_function Test $a ( + if($a<3): + return(3); + endif; +); + +if($a < Test($a)): + echo "$a\n"; + $a++; +endif?> +--EXPECT-- +1 diff --git a/tests/lang/018.phpt b/tests/lang/018.phpt new file mode 100644 index 0000000000..81bed37bc8 --- /dev/null +++ b/tests/lang/018.phpt @@ -0,0 +1,37 @@ +--TEST-- +eval() test +--POST-- +--GET-- +--FILE-- +<?php + +error_reporting(0); + +$message = "echo \"hey\n\";"; + +for ($i=0; $i<10; $i++) { + eval($message); + echo $i."\n"; +} +--EXPECT-- + +hey +0 +hey +1 +hey +2 +hey +3 +hey +4 +hey +5 +hey +6 +hey +7 +hey +8 +hey +9 diff --git a/tests/lang/019.phpt b/tests/lang/019.phpt new file mode 100644 index 0000000000..5d6ddbdbcd --- /dev/null +++ b/tests/lang/019.phpt @@ -0,0 +1,39 @@ +--TEST-- +eval() test +--POST-- +--GET-- +--FILE-- +<?php + +error_reporting(0); + +eval("cfunction test() { echo \"hey, this is a function inside an eval()!\\n\"; }"); + +$i=0; +while ($i<10) { + eval("echo \"hey, this is a regular echo'd eval()\\n\";"); + test(); + $i++; +} +--EXPECT-- + +hey, this is a regular echo'd eval() +hey, this is a function inside an eval()! +hey, this is a regular echo'd eval() +hey, this is a function inside an eval()! +hey, this is a regular echo'd eval() +hey, this is a function inside an eval()! +hey, this is a regular echo'd eval() +hey, this is a function inside an eval()! +hey, this is a regular echo'd eval() +hey, this is a function inside an eval()! +hey, this is a regular echo'd eval() +hey, this is a function inside an eval()! +hey, this is a regular echo'd eval() +hey, this is a function inside an eval()! +hey, this is a regular echo'd eval() +hey, this is a function inside an eval()! +hey, this is a regular echo'd eval() +hey, this is a function inside an eval()! +hey, this is a regular echo'd eval() +hey, this is a function inside an eval()! diff --git a/tests/lang/020.phpt b/tests/lang/020.phpt new file mode 100644 index 0000000000..b18f00e4b5 --- /dev/null +++ b/tests/lang/020.phpt @@ -0,0 +1,79 @@ +--TEST-- +Switch test 1 +--POST-- +--GET-- +--FILE-- +<?php + +$i="abc"; + +for ($j=0; $j<10; $j++) { +switch (1) { + case 1: + echo "In branch 1\n"; + switch ($i) { + case "ab": + echo "This doesn't work... :(\n"; + break; + case "abcd": + echo "This works!\n"; + break; + case "blah": + echo "Hmmm, no worki\n"; + break; + default: + echo "Inner default...\n"; + } + for ($blah=0; $blah<200; $blah++) { + if ($blah==100) { + echo "blah=$blah\n"; + } + } + break; + case 2: + echo "In branch 2\n"; + break; + case $i: + echo "In branch \$i\n"; + break; + case 4: + echo "In branch 4\n"; + break; + default: + echo "Hi, I'm default\n"; + break; + } +} +?> +--EXPECT-- + +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 diff --git a/tests/lang/021.phpt b/tests/lang/021.phpt new file mode 100644 index 0000000000..15fcf9d21b --- /dev/null +++ b/tests/lang/021.phpt @@ -0,0 +1,45 @@ +--TEST-- +Switch test 2 +--POST-- +--GET-- +--FILE-- +<?php + +for ($i=0; $i<=5; $i++) +{ + echo "i=$i\n"; + + switch($i) { + case 0: + echo "In branch 0\n"; + break; + case 1: + echo "In branch 1\n"; + break; + case 2: + echo "In branch 2\n"; + break; + case 3: + echo "In branch 3\n"; + break 2; + case 4: + echo "In branch 4\n"; + break; + default: + echo "In default\n"; + break; + } +} +echo "hi\n"; +?> +--EXPECT-- + +i=0 +In branch 0 +i=1 +In branch 1 +i=2 +In branch 2 +i=3 +In branch 3 +hi diff --git a/tests/lang/022.phpt b/tests/lang/022.phpt new file mode 100644 index 0000000000..072d66f085 --- /dev/null +++ b/tests/lang/022.phpt @@ -0,0 +1,66 @@ +--TEST-- +Switch test 3 +--POST-- +--GET-- +--FILE-- +<?php + +cfunction switchtest ($i, $j) +{ + switch ($i): + case 0: + switch($j) { + case 0: + echo zero; + break; + case 1: + echo one; + break; + default: + echo $j; + break; + } + echo "\n"; + break; + default: + echo "Default taken\n"; + endswitch; +} +for ($i=0; $i<3; $i++) { + for ($k=0; $k<10; $k++) { + switchtest (0,$k); + } +} +?> +--EXPECT-- + +zero +one +2 +3 +4 +5 +6 +7 +8 +9 +zero +one +2 +3 +4 +5 +6 +7 +8 +9 +zero +one +2 +3 +4 +5 +6 +7 +8 +9 diff --git a/tests/lang/023-1.inc b/tests/lang/023-1.inc new file mode 100755 index 0000000000..7fa22ea414 --- /dev/null +++ b/tests/lang/023-1.inc @@ -0,0 +1,356 @@ +<html> +<head> +<?php +/* the point of this file is to intensively test various aspects of + * the parser. right now, each test focuses in one aspect only + * (e.g. variable aliasing, arithemtic operator, various control + * structures), while trying to combine code from other parts of the + * parser as well. + */ +?> + +*** Testing assignments and variable aliasing: ***<br> +<?php + /* This test tests assignments to variables using other variables as variable-names */ + $a = "b"; + $$a = "test"; + $$$a = "blah"; + ${$$$a}["associative arrays work too"] = "this is nifty"; +?> +This should read "blah": <?php echo "$test<br>\n"; ?> +This should read "this is nifty": <?php echo $blah[$test="associative arrays work too"]."<br>\n"; ?> +*************************************************<br> + +*** Testing integer operators ***<br> +<?php + /* test just about any operator possible on $i and $j (ints) */ + $i = 5; + $j = 3; +?> +Correct result - 8: <?php echo $i+$j; ?><br> +Correct result - 8: <?php echo $i+$j; ?><br> +Correct result - 2: <?php echo $i-$j; ?><br> +Correct result - -2: <?php echo $j-$i; ?><br> +Correct result - 15: <?php echo $i*$j; ?><br> +Correct result - 15: <?php echo $j*$i; ?><br> +Correct result - 2: <?php echo $i%$j; ?><br> +Correct result - 3: <?php echo $j%$i; ?><br> +*********************************<br> + +*** Testing real operators ***<br> +<?php + /* test just about any operator possible on $i and $j (floats) */ + $i = 5.0; + $j = 3.0; +?> +Correct result - 8: <?php echo $i+$j; ?><br> +Correct result - 8: <?php echo $i+$j; ?><br> +Correct result - 2: <?php echo $i-$j; ?><br> +Correct result - -2: <?php echo $j-$i; ?><br> +Correct result - 15: <?php echo $i*$j; ?><br> +Correct result - 15: <?php echo $j*$i; ?><br> +Correct result - 2: <?php echo $i%$j; ?><br> +Correct result - 3: <?php echo $j%$i; ?><br> +*********************************<br> + +*** Testing if/elseif/else control ***<br> + +<?php +/* sick if/elseif/else test by Andi :) */ +$a = 5; +if ($a == "4") { + echo "This "." does "." not "." work<br>\n"; +} elseif ($a == "5") { + echo "This "." works<br>\n"; + $a = 6; + if ("andi" == ($test = "andi")) { + echo "this_still_works<br>\n"; + } elseif (1) { + echo "should_not_print<br>\n"; + } else { + echo "should_not_print<br>\n"; + } + if (44 == 43) { + echo "should_not_print<br>\n"; + } else { + echo "should_print<br>\n"; + } +} elseif ($a == 6) { + echo "this "."broken<br>\n"; + if (0) { + echo "this_should_not_print<br>\n"; + } else { + echo "TestingDanglingElse_This_Should_not_print<br>\n"; + } +} else { + echo "This "."does "." not"." work<br>\n"; +} +?> + + +*** Seriously nested if's test ***<br> +** spelling correction by kluzz ** +<?php +/* yet another sick if/elseif/else test by Zeev */ +$i=$j=0; +echo "Only two lines of text should follow:<br>\n"; +if (0) { /* this code is not supposed to be executed */ + echo "hmm, this shouldn't be displayed #1<br>\n"; + $j++; + if (1) { + $i ++= + $j; + if (0) { + $j = ++$i; + if (1) { + $j *= $i; + echo "damn, this shouldn't be displayed<br>\n"; + } else { + $j /= $i; + ++$j; + echo "this shouldn't be displayed either<br>\n"; + } + } elseif (1) { + $i++; $j++; + echo "this isn't supposed to be displayed<br>\n"; + } + } elseif (0) { + $i++; + echo "this definitely shouldn't be displayed<br>\n"; + } else { + --$j; + echo "and this too shouldn't be displayed<br>\n"; + while ($j>0) { + $j--; + } + } +} elseif (2-2) { /* as long as 2-2==0, this isn't supposed to be executed either */ + $i = ++$j; + echo "hmm, this shouldn't be displayed #2<br>\n"; + if (1) { + $j = ++$i; + if (0) { + $j = $i*2+$j*($i++); + if (1) { + $i++; + echo "damn, this shouldn't be displayed<br>\n"; + } else { + $j++; + echo "this shouldn't be displayed either<br>\n"; + } + } else if (1) { + ++$j; + echo "this isn't supposed to be displayed<br>\n"; + } + } elseif (0) { + $j++; + echo "this definitely shouldn't be displayed<br>\n"; + } else { + $i++; + echo "and this too shouldn't be displayed<br>\n"; + } +} else { + $j=$i++; /* this should set $i to 1, but shouldn't change $j (it's assigned $i's previous values, zero) */ + echo "this should be displayed. should be: \$i=1, \$j=0. is: \$i=$i, \$j=$j<br>\n"; + if (1) { + $j += ++$i; /* ++$i --> $i==2, $j += 2 --> $j==2 */ + if (0) { + $j += 40; + if (1) { + $i += 50; + echo "damn, this shouldn't be displayed<br>\n"; + } else { + $j += 20; + echo "this shouldn't be displayed either<br>\n"; + } + } else if (1) { + $j *= $i; /* $j *= 2 --> $j == 4 */ + echo "this is supposed to be displayed. should be: \$i=2, \$j=4. is: \$i=$i, \$j=$j<br>\n"; + echo "3 loop iterations should follow:<br>\n"; + while ($i<=$j) { + echo $i++." $j<br>\n"; + } + } + } elseif (0) { + echo "this definitely shouldn't be displayed<br>\n"; + } else { + echo "and this too shouldn't be displayed<br>\n"; + } + echo "**********************************<br>\n"; +} +?> + +*** C-style else-if's ***<br> +<?php + /* looks like without we even tried, C-style else-if structure works fine! */ + if ($a=0) { + echo "This shouldn't be displayed<br>\n"; + } else if ($a++) { + echo "This shouldn't be displayed either<br>\n"; + } else if (--$a) { + echo "No, this neither<br>\n"; + } else if (++$a) { + echo "This should be displayed<br>\n"; + } else { + echo "This shouldn't be displayed at all<br>\n"; + } +?> +*************************<br> + +*** WHILE tests ***<br> +<?php +$i=0; +$j=20; +while ($i<(2*$j)) { + if ($i>$j) { + echo "$i is greater than $j<br>\n"; + } else if ($i==$j) { + echo "$i equals $j<br>\n"; + } else { + echo "$i is smaller than $j<br>\n"; + } + $i++; +} +?> +*******************<br> + + +*** Nested WHILEs ***<br> +<?php +$arr_len=3; + +$i=0; +while ($i<$arr_len) { + $j=0; + while ($j<$arr_len) { + $k=0; + while ($k<$arr_len) { + ${test.$i.$j}[$k] = $i+$j+$k; + $k++; + } + $j++; + } + $i++; +} + +echo "Each array variable should be equal to the sum of its indices:<br>\n"; + +$i=0; +while ($i<$arr_len) { + $j=0; + while ($j<$arr_len) { + $k=0; + while ($k<$arr_len) { + echo "\${test$i$j}[$k] = ".${"test$i$j"}[$k]."<br>\n"; + $k++; + } + $j++; + } + $i++; +} +?> +*********************<br> + +*** hash test... ***<br> +<?php +/* +$i=0; + +while ($i<10000) { + $arr[$i]=$i; + $i++; +} + +$i=0; +while ($i<10000) { + echo $arr[$i++]."<br>\n"; +} +*/ +echo "commented out..."; +?> + +**************************<br> + +*** Hash resizing test ***<br> +<?php +$i = 10; +$a = b; +while ($i > 0) { + $a = $a . a; + echo "$a<br>\n"; + $resize[$a] = $i; + $i--; +} +$i = 10; +$a = b; +while ($i > 0) { + $a = $a . a; + echo "$a<br>\n"; + echo $resize[$a]."<br>\n"; + $i--; +} +?> +**************************<br> + + +*** break/continue test ***<br> +<?php +$i=0; + +echo "\$i should go from 0 to 2<br>\n"; +while ($i<5) { + if ($i>2) { + break; + } + $j=0; + echo "\$j should go from 3 to 4, and \$q should go from 3 to 4<br>\n"; + while ($j<5) { + if ($j<=2) { + $j++; + continue; + } + echo " \$j=$j<br>\n"; + for ($q=0; $q<=10; $q++) { + if ($q<3) { + continue; + } + if ($q>4) { + break; + } + echo " \$q=$q<br>\n"; + } + $j++; + } + $j=0; + echo "\$j should go from 0 to 2<br>\n"; + while ($j<5) { + if ($j>2) { + $k=0; + echo "\$k should go from 0 to 2<br>\n"; + while ($k<5) { + if ($k>2) { + break 2; + } + echo " \$k=$k<br>\n"; + $k++; + } + } + echo " \$j=$j<br>\n"; + $j++; + } + echo "\$i=$i<br>\n"; + $i++; +} +?> +***********************<br> + +*** Nested file include test ***<br> +<?php include("023-2.inc"); ?> +********************************<br> + +<?php +{ + echo "Tests completed.<br>\n"; # testing some PHP style comment... +} +?> diff --git a/tests/lang/023-2.inc b/tests/lang/023-2.inc new file mode 100755 index 0000000000..6dd1e730f1 --- /dev/null +++ b/tests/lang/023-2.inc @@ -0,0 +1,6 @@ +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +<?php echo "and this is PHP code, 2+2=".(2+2).""; ?> + +</html> diff --git a/tests/lang/023.phpt b/tests/lang/023.phpt new file mode 100644 index 0000000000..38d5796c7f --- /dev/null +++ b/tests/lang/023.phpt @@ -0,0 +1,275 @@ +--TEST-- +Regression test +--POST-- +--GET-- +--FILE-- +PHP Regression Test + +<?php + +include("023-1.inc"); + +$wedding_timestamp = mktime(20,0,0,8,31,1997); +$time_left=$wedding_timestamp-time(); + +if ($time_left>0) { + $days = $time_left/(24*3600); + $time_left -= $days*24*3600; + $hours = $time_left/3600; + $time_left -= $hours*3600; + $minutes = $time_left/60; + echo "Limor Ullmann is getting married on ".($wedding_date=date("l, F dS, Y",$wedding_timestamp)).",\nwhich is $days days, $hours hours and $minutes minutes from now.\n"; + echo "Her hashed wedding date is $wedding_date.\n"; +} else { + echo "Limor Ullmann is now Limor Baruch :I\n"; +} + + +?> +--EXPECT-- + +PHP Regression Test + +<html> +<head> + + +*** Testing assignments and variable aliasing: ***<br> + +This should read "blah": blah<br> + +This should read "this is nifty": this is nifty<br> + +*************************************************<br> + +*** Testing integer operators ***<br> + +Correct result - 8: 8<br> +Correct result - 8: 8<br> +Correct result - 2: 2<br> +Correct result - -2: -2<br> +Correct result - 15: 15<br> +Correct result - 15: 15<br> +Correct result - 2: 2<br> +Correct result - 3: 3<br> +*********************************<br> + +*** Testing real operators ***<br> + +Correct result - 8: 8<br> +Correct result - 8: 8<br> +Correct result - 2: 2<br> +Correct result - -2: -2<br> +Correct result - 15: 15<br> +Correct result - 15: 15<br> +Correct result - 2: 2<br> +Correct result - 3: 3<br> +*********************************<br> + +*** Testing if/elseif/else control ***<br> + +This works<br> +this_still_works<br> +should_print<br> + + + +*** Seriously nested if's test ***<br> +** spelling correction by kluzz ** +Only two lines of text should follow:<br> +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0<br> +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4<br> +3 loop iterations should follow:<br> +2 4<br> +3 4<br> +4 4<br> +**********************************<br> + + +*** C-style else-if's ***<br> +This should be displayed<br> + +*************************<br> + +*** WHILE tests ***<br> +0 is smaller than 20<br> +1 is smaller than 20<br> +2 is smaller than 20<br> +3 is smaller than 20<br> +4 is smaller than 20<br> +5 is smaller than 20<br> +6 is smaller than 20<br> +7 is smaller than 20<br> +8 is smaller than 20<br> +9 is smaller than 20<br> +10 is smaller than 20<br> +11 is smaller than 20<br> +12 is smaller than 20<br> +13 is smaller than 20<br> +14 is smaller than 20<br> +15 is smaller than 20<br> +16 is smaller than 20<br> +17 is smaller than 20<br> +18 is smaller than 20<br> +19 is smaller than 20<br> +20 equals 20<br> +21 is greater than 20<br> +22 is greater than 20<br> +23 is greater than 20<br> +24 is greater than 20<br> +25 is greater than 20<br> +26 is greater than 20<br> +27 is greater than 20<br> +28 is greater than 20<br> +29 is greater than 20<br> +30 is greater than 20<br> +31 is greater than 20<br> +32 is greater than 20<br> +33 is greater than 20<br> +34 is greater than 20<br> +35 is greater than 20<br> +36 is greater than 20<br> +37 is greater than 20<br> +38 is greater than 20<br> +39 is greater than 20<br> + +*******************<br> + + +*** Nested WHILEs ***<br> +Each array variable should be equal to the sum of its indices:<br> +${test00}[0] = 0<br> +${test00}[1] = 1<br> +${test00}[2] = 2<br> +${test01}[0] = 1<br> +${test01}[1] = 2<br> +${test01}[2] = 3<br> +${test02}[0] = 2<br> +${test02}[1] = 3<br> +${test02}[2] = 4<br> +${test10}[0] = 1<br> +${test10}[1] = 2<br> +${test10}[2] = 3<br> +${test11}[0] = 2<br> +${test11}[1] = 3<br> +${test11}[2] = 4<br> +${test12}[0] = 3<br> +${test12}[1] = 4<br> +${test12}[2] = 5<br> +${test20}[0] = 2<br> +${test20}[1] = 3<br> +${test20}[2] = 4<br> +${test21}[0] = 3<br> +${test21}[1] = 4<br> +${test21}[2] = 5<br> +${test22}[0] = 4<br> +${test22}[1] = 5<br> +${test22}[2] = 6<br> + +*********************<br> + +*** hash test... ***<br> +commented out... + +**************************<br> + +*** Hash resizing test ***<br> +ba<br> +baa<br> +baaa<br> +baaaa<br> +baaaaa<br> +baaaaaa<br> +baaaaaaa<br> +baaaaaaaa<br> +baaaaaaaaa<br> +baaaaaaaaaa<br> +ba<br> +10<br> +baa<br> +9<br> +baaa<br> +8<br> +baaaa<br> +7<br> +baaaaa<br> +6<br> +baaaaaa<br> +5<br> +baaaaaaa<br> +4<br> +baaaaaaaa<br> +3<br> +baaaaaaaaa<br> +2<br> +baaaaaaaaaa<br> +1<br> + +**************************<br> + + +*** break/continue test ***<br> +$i should go from 0 to 2<br> +$j should go from 3 to 4, and $q should go from 3 to 4<br> + $j=3<br> + $q=3<br> + $q=4<br> + $j=4<br> + $q=3<br> + $q=4<br> +$j should go from 0 to 2<br> + $j=0<br> + $j=1<br> + $j=2<br> +$k should go from 0 to 2<br> + $k=0<br> + $k=1<br> + $k=2<br> +$i=0<br> +$j should go from 3 to 4, and $q should go from 3 to 4<br> + $j=3<br> + $q=3<br> + $q=4<br> + $j=4<br> + $q=3<br> + $q=4<br> +$j should go from 0 to 2<br> + $j=0<br> + $j=1<br> + $j=2<br> +$k should go from 0 to 2<br> + $k=0<br> + $k=1<br> + $k=2<br> +$i=1<br> +$j should go from 3 to 4, and $q should go from 3 to 4<br> + $j=3<br> + $q=3<br> + $q=4<br> + $j=4<br> + $q=3<br> + $q=4<br> +$j should go from 0 to 2<br> + $j=0<br> + $j=1<br> + $j=2<br> +$k should go from 0 to 2<br> + $k=0<br> + $k=1<br> + $k=2<br> +$i=2<br> + +***********************<br> + +*** Nested file include test ***<br> +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +********************************<br> + +Tests completed.<br> + +Limor Ullmann is now Limor Baruch :I diff --git a/tests/lang/024.phpt b/tests/lang/024.phpt new file mode 100644 index 0000000000..44170d61d6 --- /dev/null +++ b/tests/lang/024.phpt @@ -0,0 +1,12627 @@ +--TEST-- +Looped regression test (may take a while) +--POST-- +--GET-- +--FILE-- +<?php +for ($jdk=0; $jdk<50; $jdk++) { +?> + +<html> +<head> +<?php /* the point of this file is to intensively test various aspects of the parser. + * right now, each test focuses in one aspect only (e.g. variable aliasing, arithemtic operator, + * various control structures), while trying to combine code from other parts of the parser as well. + */ +?> + +*** Testing assignments and variable aliasing: *** +<?php + /* This test tests assignments to variables using other variables as variable-names */ + $a = "b"; + $$a = "test"; + $$$a = "blah"; + ${$$$a}["associative arrays work too"] = "this is nifty"; +?> +This should read "blah": <?php echo "$test\n"; ?> +This should read "this is nifty": <?php echo $blah[$test="associative arrays work too"]."\n"; ?> +************************************************* + +*** Testing integer operators *** +<?php + /* test just about any operator possible on $i and $j (ints) */ + $i = 5; + $j = 3; +?> +Correct result - 8: <?php echo $i+$j; ?> + +Correct result - 8: <?php echo $i+$j; ?> + +Correct result - 2: <?php echo $i-$j; ?> + +Correct result - -2: <?php echo $j-$i; ?> + +Correct result - 15: <?php echo $i*$j; ?> + +Correct result - 15: <?php echo $j*$i; ?> + +Correct result - 2: <?php echo $i%$j; ?> + +Correct result - 3: <?php echo $j%$i; ?> + +********************************* + +*** Testing real operators *** +<?php + /* test just about any operator possible on $i and $j (floats) */ + $i = 5.0; + $j = 3.0; +?> +Correct result - 8: <?php echo $i+$j; ?> + +Correct result - 8: <?php echo $i+$j; ?> + +Correct result - 2: <?php echo $i-$j; ?> + +Correct result - -2: <?php echo $j-$i; ?> + +Correct result - 15: <?php echo $i*$j; ?> + +Correct result - 15: <?php echo $j*$i; ?> + +Correct result - 2: <?php echo $i%$j; ?> + +Correct result - 3: <?php echo $j%$i; ?> + +********************************* + +*** Testing if/elseif/else control *** + +<?php +/* sick if/elseif/else test by Andi :) */ +$a = 5; +if ($a == "4") { + echo "This "." does "." not "." work\n"; +} elseif ($a == "5") { + echo "This "." works\n"; + $a = 6; + if ("andi" == ($test = "andi")) { + echo "this_still_works\n"; + } elseif (1) { + echo "should_not_print\n"; + } else { + echo "should_not_print\n"; + } + if (44 == 43) { + echo "should_not_print\n"; + } else { + echo "should_print\n"; + } +} elseif ($a == 6) { + echo "this "."broken\n"; + if (0) { + echo "this_should_not_print\n"; + } else { + echo "TestingDanglingElse_This_Should_not_print\n"; + } +} else { + echo "This "."does "." not"." work\n"; +} +?> + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +<?php +/* yet another sick if/elseif/else test by Zeev */ +$i=$j=0; +echo "Only two lines of text should follow:\n"; +if (0) { /* this code is not supposed to be executed */ + echo "hmm, this shouldn't be displayed #1\n"; + $j++; + if (1) { + $i += $j; + if (0) { + $j = ++$i; + if (1) { + $j *= $i; + echo "damn, this shouldn't be displayed\n"; + } else { + $j /= $i; + ++$j; + echo "this shouldn't be displayed either\n"; + } + } elseif (1) { + $i++; $j++; + echo "this isn't supposed to be displayed\n"; + } + } elseif (0) { + $i++; + echo "this definitely shouldn't be displayed\n"; + } else { + --$j; + echo "and this too shouldn't be displayed\n"; + while ($j>0) { + $j--; + } + } +} elseif (2-2) { /* as long as 2-2==0, this isn't supposed to be executed either */ + $i = ++$j; + echo "hmm, this shouldn't be displayed #2\n"; + if (1) { + $j = ++$i; + if (0) { + $j = $i*2+$j*($i++); + if (1) { + $i++; + echo "damn, this shouldn't be displayed\n"; + } else { + $j++; + echo "this shouldn't be displayed either\n"; + } + } else if (1) { + ++$j; + echo "this isn't supposed to be displayed\n"; + } + } elseif (0) { + $j++; + echo "this definitely shouldn't be displayed\n"; + } else { + $i++; + echo "and this too shouldn't be displayed\n"; + } +} else { + $j=$i++; /* this should set $i to 1, but shouldn't change $j (it's assigned $i's previous values, zero) */ + echo "this should be displayed. should be: \$i=1, \$j=0. is: \$i=$i, \$j=$j\n"; + if (1) { + $j += ++$i; /* ++$i --> $i==2, $j += 2 --> $j==2 */ + if (0) { + $j += 40; + if (1) { + $i += 50; + echo "damn, this shouldn't be displayed\n"; + } else { + $j += 20; + echo "this shouldn't be displayed either\n"; + } + } else if (1) { + $j *= $i; /* $j *= 2 --> $j == 4 */ + echo "this is supposed to be displayed. should be: \$i=2, \$j=4. is: \$i=$i, \$j=$j\n"; + echo "3 loop iterations should follow:\n"; + while ($i<=$j) { + echo $i++." $j\n"; + } + } + } elseif (0) { + echo "this definitely shouldn't be displayed\n"; + } else { + echo "and this too shouldn't be displayed\n"; + } + echo "**********************************\n"; +} +?> + +*** C-style else-if's *** +<?php + /* looks like without we even tried, C-style else-if structure works fine! */ + if ($a=0) { + echo "This shouldn't be displayed\n"; + } else if ($a++) { + echo "This shouldn't be displayed either\n"; + } else if (--$a) { + echo "No, this neither\n"; + } else if (++$a) { + echo "This should be displayed\n"; + } else { + echo "This shouldn't be displayed at all\n"; + } +?> +************************* + +*** WHILE tests *** +<?php +$i=0; +$j=20; +while ($i<(2*$j)) { + if ($i>$j) { + echo "$i is greater than $j\n"; + } else if ($i==$j) { + echo "$i equals $j\n"; + } else { + echo "$i is smaller than $j\n"; + } + $i++; +} +?> +******************* + + +*** Nested WHILEs *** +<?php +$arr_len=3; + +$i=0; +while ($i<$arr_len) { + $j=0; + while ($j<$arr_len) { + $k=0; + while ($k<$arr_len) { + ${test.$i.$j}[$k] = $i+$j+$k; + $k++; + } + $j++; + } + $i++; +} + +echo "Each array variable should be equal to the sum of its indices:\n"; + +$i=0; +while ($i<$arr_len) { + $j=0; + while ($j<$arr_len) { + $k=0; + while ($k<$arr_len) { + echo "\${test$i$j}[$k] = ".${"test$i$j"}[$k]."\n"; + $k++; + } + $j++; + } + $i++; +} +?> +********************* + +*** hash test... *** +<?php +/* +$i=0; + +while ($i<10000) { + $arr[$i]=$i; + $i++; +} + +$i=0; +while ($i<10000) { + echo $arr[$i++]."\n"; +} +*/ +echo "commented out..."; +?> + +************************** + +*** Hash resizing test *** +<?php +$i = 10; +$a = b; +while ($i > 0) { + $a = $a . a; + echo "$a\n"; + $resize[$a] = $i; + $i--; +} +$i = 10; +$a = b; +while ($i > 0) { + $a = $a . a; + echo "$a\n"; + echo $resize[$a]."\n"; + $i--; +} +?> +************************** + + +*** break/continue test *** +<?php +$i=0; + +echo "\$i should go from 0 to 2\n"; +while ($i<5) { + if ($i>2) { + break; + } + $j=0; + echo "\$j should go from 3 to 4, and \$q should go from 3 to 4\n"; + while ($j<5) { + if ($j<=2) { + $j++; + continue; + } + echo " \$j=$j\n"; + for ($q=0; $q<=10; $q++) { + if ($q<3) { + continue; + } + if ($q>4) { + break; + } + echo " \$q=$q\n"; + } + $j++; + } + $j=0; + echo "\$j should go from 0 to 2\n"; + while ($j<5) { + if ($j>2) { + $k=0; + echo "\$k should go from 0 to 2\n"; + while ($k<5) { + if ($k>2) { + break 2; + } + echo " \$k=$k\n"; + $k++; + } + } + echo " \$j=$j\n"; + $j++; + } + echo "\$i=$i\n"; + $i++; +} +?> +*********************** + +*** Nested file include test *** +<?php include("lang/023-2.inc"); ?> +******************************** + +<?php +{ + echo "Tests completed.\n"; # testing some PHP style comment... +} +?> + +<?php } ?> +--EXPECT-- + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + + + + +<html> +<head> + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": blah + +This should read "this is nifty": this is nifty + +************************************************* + +*** Testing integer operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** + +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + + +*** C-style else-if's *** +This should be displayed + +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 + +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 + +********************* + +*** hash test... *** +commented out... + +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 + +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 + +*********************** + +*** Nested file include test *** +<html> +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 +</html> + +******************************** + +Tests completed. + diff --git a/tests/lang/025.phpt b/tests/lang/025.phpt new file mode 100644 index 0000000000..1f9884b29c --- /dev/null +++ b/tests/lang/025.phpt @@ -0,0 +1,541 @@ +--TEST-- +Mean recursion test +--POST-- +--GET-- +--FILE-- +<?php +old_function RekTest $nr ( + +echo " $nr "; + + +$j=$nr+1; +while ($j < 10) +{ + echo " a "; + RekTest($j); + $j++; + echo " b $j "; +}; +echo "\n"; + + + +); + +RekTest(0); +?> +--EXPECT-- + + 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 4 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 3 a 3 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 4 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 2 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 4 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 3 a 3 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 4 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 diff --git a/tests/lang/026.phpt b/tests/lang/026.phpt new file mode 100644 index 0000000000..e201b75638 --- /dev/null +++ b/tests/lang/026.phpt @@ -0,0 +1,8 @@ +--TEST-- +Testing string scanner confirmance +--POST-- +--GET-- +--FILE-- +<?php echo "\"\t\\'" . '\n\\\'a\\\b\\' ?> +--EXPECT-- +" \'\n\'a\\b\ diff --git a/tests/lang/027.phpt b/tests/lang/027.phpt new file mode 100644 index 0000000000..5cd44e0fab --- /dev/null +++ b/tests/lang/027.phpt @@ -0,0 +1,14 @@ +--TEST-- +Testing do-while loop +--POST-- +--GET-- +--FILE-- +<?php +$i=3; +do { + echo $i; + $i--; +} while($i>0); +?> +--EXPECT-- +321 diff --git a/tests/lang/028.phpt b/tests/lang/028.phpt new file mode 100644 index 0000000000..a0223f0990 --- /dev/null +++ b/tests/lang/028.phpt @@ -0,0 +1,1262 @@ +--TEST-- +Testing calling user-level functions from C +--POST-- +--GET-- +--FILE-- +<?php + +error_reporting(1023); + +function print_stuff($stuff) +{ + print $stuff; +} + + +function still_working() +{ + return "I'm still alive"; +} + +function dafna() +{ + static $foo = 0; + + print "Dafna!\n"; + print call_user_func("still_working")."\n"; + $foo++; + return (string) $foo; +} + + +class dafna_class { + function dafna_class() { + $this->myname = "Dafna"; + } + function GetMyName() { + return $this->myname; + } + function SetMyName($name) { + $this->myname = $name; + } +}; + +for ($i=0; $i<200; $i++): + print "$i\n"; + call_user_func("dafna"); + call_user_func("print_stuff","Hey there!!\n"); + print "$i\n"; +endfor; + + +$dafna = new dafna_class(); + +for ($i=0; $i<200; $i++): +print $name=call_user_method("GetMyName", &$dafna); +print "\n"; +call_user_method("SetMyName", &$dafna, ++$name); +endfor; + +?> + +--EXPECT-- +0 +Dafna! +I'm still alive +Hey there!! +0 +1 +Dafna! +I'm still alive +Hey there!! +1 +2 +Dafna! +I'm still alive +Hey there!! +2 +3 +Dafna! +I'm still alive +Hey there!! +3 +4 +Dafna! +I'm still alive +Hey there!! +4 +5 +Dafna! +I'm still alive +Hey there!! +5 +6 +Dafna! +I'm still alive +Hey there!! +6 +7 +Dafna! +I'm still alive +Hey there!! +7 +8 +Dafna! +I'm still alive +Hey there!! +8 +9 +Dafna! +I'm still alive +Hey there!! +9 +10 +Dafna! +I'm still alive +Hey there!! +10 +11 +Dafna! +I'm still alive +Hey there!! +11 +12 +Dafna! +I'm still alive +Hey there!! +12 +13 +Dafna! +I'm still alive +Hey there!! +13 +14 +Dafna! +I'm still alive +Hey there!! +14 +15 +Dafna! +I'm still alive +Hey there!! +15 +16 +Dafna! +I'm still alive +Hey there!! +16 +17 +Dafna! +I'm still alive +Hey there!! +17 +18 +Dafna! +I'm still alive +Hey there!! +18 +19 +Dafna! +I'm still alive +Hey there!! +19 +20 +Dafna! +I'm still alive +Hey there!! +20 +21 +Dafna! +I'm still alive +Hey there!! +21 +22 +Dafna! +I'm still alive +Hey there!! +22 +23 +Dafna! +I'm still alive +Hey there!! +23 +24 +Dafna! +I'm still alive +Hey there!! +24 +25 +Dafna! +I'm still alive +Hey there!! +25 +26 +Dafna! +I'm still alive +Hey there!! +26 +27 +Dafna! +I'm still alive +Hey there!! +27 +28 +Dafna! +I'm still alive +Hey there!! +28 +29 +Dafna! +I'm still alive +Hey there!! +29 +30 +Dafna! +I'm still alive +Hey there!! +30 +31 +Dafna! +I'm still alive +Hey there!! +31 +32 +Dafna! +I'm still alive +Hey there!! +32 +33 +Dafna! +I'm still alive +Hey there!! +33 +34 +Dafna! +I'm still alive +Hey there!! +34 +35 +Dafna! +I'm still alive +Hey there!! +35 +36 +Dafna! +I'm still alive +Hey there!! +36 +37 +Dafna! +I'm still alive +Hey there!! +37 +38 +Dafna! +I'm still alive +Hey there!! +38 +39 +Dafna! +I'm still alive +Hey there!! +39 +40 +Dafna! +I'm still alive +Hey there!! +40 +41 +Dafna! +I'm still alive +Hey there!! +41 +42 +Dafna! +I'm still alive +Hey there!! +42 +43 +Dafna! +I'm still alive +Hey there!! +43 +44 +Dafna! +I'm still alive +Hey there!! +44 +45 +Dafna! +I'm still alive +Hey there!! +45 +46 +Dafna! +I'm still alive +Hey there!! +46 +47 +Dafna! +I'm still alive +Hey there!! +47 +48 +Dafna! +I'm still alive +Hey there!! +48 +49 +Dafna! +I'm still alive +Hey there!! +49 +50 +Dafna! +I'm still alive +Hey there!! +50 +51 +Dafna! +I'm still alive +Hey there!! +51 +52 +Dafna! +I'm still alive +Hey there!! +52 +53 +Dafna! +I'm still alive +Hey there!! +53 +54 +Dafna! +I'm still alive +Hey there!! +54 +55 +Dafna! +I'm still alive +Hey there!! +55 +56 +Dafna! +I'm still alive +Hey there!! +56 +57 +Dafna! +I'm still alive +Hey there!! +57 +58 +Dafna! +I'm still alive +Hey there!! +58 +59 +Dafna! +I'm still alive +Hey there!! +59 +60 +Dafna! +I'm still alive +Hey there!! +60 +61 +Dafna! +I'm still alive +Hey there!! +61 +62 +Dafna! +I'm still alive +Hey there!! +62 +63 +Dafna! +I'm still alive +Hey there!! +63 +64 +Dafna! +I'm still alive +Hey there!! +64 +65 +Dafna! +I'm still alive +Hey there!! +65 +66 +Dafna! +I'm still alive +Hey there!! +66 +67 +Dafna! +I'm still alive +Hey there!! +67 +68 +Dafna! +I'm still alive +Hey there!! +68 +69 +Dafna! +I'm still alive +Hey there!! +69 +70 +Dafna! +I'm still alive +Hey there!! +70 +71 +Dafna! +I'm still alive +Hey there!! +71 +72 +Dafna! +I'm still alive +Hey there!! +72 +73 +Dafna! +I'm still alive +Hey there!! +73 +74 +Dafna! +I'm still alive +Hey there!! +74 +75 +Dafna! +I'm still alive +Hey there!! +75 +76 +Dafna! +I'm still alive +Hey there!! +76 +77 +Dafna! +I'm still alive +Hey there!! +77 +78 +Dafna! +I'm still alive +Hey there!! +78 +79 +Dafna! +I'm still alive +Hey there!! +79 +80 +Dafna! +I'm still alive +Hey there!! +80 +81 +Dafna! +I'm still alive +Hey there!! +81 +82 +Dafna! +I'm still alive +Hey there!! +82 +83 +Dafna! +I'm still alive +Hey there!! +83 +84 +Dafna! +I'm still alive +Hey there!! +84 +85 +Dafna! +I'm still alive +Hey there!! +85 +86 +Dafna! +I'm still alive +Hey there!! +86 +87 +Dafna! +I'm still alive +Hey there!! +87 +88 +Dafna! +I'm still alive +Hey there!! +88 +89 +Dafna! +I'm still alive +Hey there!! +89 +90 +Dafna! +I'm still alive +Hey there!! +90 +91 +Dafna! +I'm still alive +Hey there!! +91 +92 +Dafna! +I'm still alive +Hey there!! +92 +93 +Dafna! +I'm still alive +Hey there!! +93 +94 +Dafna! +I'm still alive +Hey there!! +94 +95 +Dafna! +I'm still alive +Hey there!! +95 +96 +Dafna! +I'm still alive +Hey there!! +96 +97 +Dafna! +I'm still alive +Hey there!! +97 +98 +Dafna! +I'm still alive +Hey there!! +98 +99 +Dafna! +I'm still alive +Hey there!! +99 +100 +Dafna! +I'm still alive +Hey there!! +100 +101 +Dafna! +I'm still alive +Hey there!! +101 +102 +Dafna! +I'm still alive +Hey there!! +102 +103 +Dafna! +I'm still alive +Hey there!! +103 +104 +Dafna! +I'm still alive +Hey there!! +104 +105 +Dafna! +I'm still alive +Hey there!! +105 +106 +Dafna! +I'm still alive +Hey there!! +106 +107 +Dafna! +I'm still alive +Hey there!! +107 +108 +Dafna! +I'm still alive +Hey there!! +108 +109 +Dafna! +I'm still alive +Hey there!! +109 +110 +Dafna! +I'm still alive +Hey there!! +110 +111 +Dafna! +I'm still alive +Hey there!! +111 +112 +Dafna! +I'm still alive +Hey there!! +112 +113 +Dafna! +I'm still alive +Hey there!! +113 +114 +Dafna! +I'm still alive +Hey there!! +114 +115 +Dafna! +I'm still alive +Hey there!! +115 +116 +Dafna! +I'm still alive +Hey there!! +116 +117 +Dafna! +I'm still alive +Hey there!! +117 +118 +Dafna! +I'm still alive +Hey there!! +118 +119 +Dafna! +I'm still alive +Hey there!! +119 +120 +Dafna! +I'm still alive +Hey there!! +120 +121 +Dafna! +I'm still alive +Hey there!! +121 +122 +Dafna! +I'm still alive +Hey there!! +122 +123 +Dafna! +I'm still alive +Hey there!! +123 +124 +Dafna! +I'm still alive +Hey there!! +124 +125 +Dafna! +I'm still alive +Hey there!! +125 +126 +Dafna! +I'm still alive +Hey there!! +126 +127 +Dafna! +I'm still alive +Hey there!! +127 +128 +Dafna! +I'm still alive +Hey there!! +128 +129 +Dafna! +I'm still alive +Hey there!! +129 +130 +Dafna! +I'm still alive +Hey there!! +130 +131 +Dafna! +I'm still alive +Hey there!! +131 +132 +Dafna! +I'm still alive +Hey there!! +132 +133 +Dafna! +I'm still alive +Hey there!! +133 +134 +Dafna! +I'm still alive +Hey there!! +134 +135 +Dafna! +I'm still alive +Hey there!! +135 +136 +Dafna! +I'm still alive +Hey there!! +136 +137 +Dafna! +I'm still alive +Hey there!! +137 +138 +Dafna! +I'm still alive +Hey there!! +138 +139 +Dafna! +I'm still alive +Hey there!! +139 +140 +Dafna! +I'm still alive +Hey there!! +140 +141 +Dafna! +I'm still alive +Hey there!! +141 +142 +Dafna! +I'm still alive +Hey there!! +142 +143 +Dafna! +I'm still alive +Hey there!! +143 +144 +Dafna! +I'm still alive +Hey there!! +144 +145 +Dafna! +I'm still alive +Hey there!! +145 +146 +Dafna! +I'm still alive +Hey there!! +146 +147 +Dafna! +I'm still alive +Hey there!! +147 +148 +Dafna! +I'm still alive +Hey there!! +148 +149 +Dafna! +I'm still alive +Hey there!! +149 +150 +Dafna! +I'm still alive +Hey there!! +150 +151 +Dafna! +I'm still alive +Hey there!! +151 +152 +Dafna! +I'm still alive +Hey there!! +152 +153 +Dafna! +I'm still alive +Hey there!! +153 +154 +Dafna! +I'm still alive +Hey there!! +154 +155 +Dafna! +I'm still alive +Hey there!! +155 +156 +Dafna! +I'm still alive +Hey there!! +156 +157 +Dafna! +I'm still alive +Hey there!! +157 +158 +Dafna! +I'm still alive +Hey there!! +158 +159 +Dafna! +I'm still alive +Hey there!! +159 +160 +Dafna! +I'm still alive +Hey there!! +160 +161 +Dafna! +I'm still alive +Hey there!! +161 +162 +Dafna! +I'm still alive +Hey there!! +162 +163 +Dafna! +I'm still alive +Hey there!! +163 +164 +Dafna! +I'm still alive +Hey there!! +164 +165 +Dafna! +I'm still alive +Hey there!! +165 +166 +Dafna! +I'm still alive +Hey there!! +166 +167 +Dafna! +I'm still alive +Hey there!! +167 +168 +Dafna! +I'm still alive +Hey there!! +168 +169 +Dafna! +I'm still alive +Hey there!! +169 +170 +Dafna! +I'm still alive +Hey there!! +170 +171 +Dafna! +I'm still alive +Hey there!! +171 +172 +Dafna! +I'm still alive +Hey there!! +172 +173 +Dafna! +I'm still alive +Hey there!! +173 +174 +Dafna! +I'm still alive +Hey there!! +174 +175 +Dafna! +I'm still alive +Hey there!! +175 +176 +Dafna! +I'm still alive +Hey there!! +176 +177 +Dafna! +I'm still alive +Hey there!! +177 +178 +Dafna! +I'm still alive +Hey there!! +178 +179 +Dafna! +I'm still alive +Hey there!! +179 +180 +Dafna! +I'm still alive +Hey there!! +180 +181 +Dafna! +I'm still alive +Hey there!! +181 +182 +Dafna! +I'm still alive +Hey there!! +182 +183 +Dafna! +I'm still alive +Hey there!! +183 +184 +Dafna! +I'm still alive +Hey there!! +184 +185 +Dafna! +I'm still alive +Hey there!! +185 +186 +Dafna! +I'm still alive +Hey there!! +186 +187 +Dafna! +I'm still alive +Hey there!! +187 +188 +Dafna! +I'm still alive +Hey there!! +188 +189 +Dafna! +I'm still alive +Hey there!! +189 +190 +Dafna! +I'm still alive +Hey there!! +190 +191 +Dafna! +I'm still alive +Hey there!! +191 +192 +Dafna! +I'm still alive +Hey there!! +192 +193 +Dafna! +I'm still alive +Hey there!! +193 +194 +Dafna! +I'm still alive +Hey there!! +194 +195 +Dafna! +I'm still alive +Hey there!! +195 +196 +Dafna! +I'm still alive +Hey there!! +196 +197 +Dafna! +I'm still alive +Hey there!! +197 +198 +Dafna! +I'm still alive +Hey there!! +198 +199 +Dafna! +I'm still alive +Hey there!! +199 +Dafna +Dafnb +Dafnc +Dafnd +Dafne +Dafnf +Dafng +Dafnh +Dafni +Dafnj +Dafnk +Dafnl +Dafnm +Dafnn +Dafno +Dafnp +Dafnq +Dafnr +Dafns +Dafnt +Dafnu +Dafnv +Dafnw +Dafnx +Dafny +Dafnz +Dafoa +Dafob +Dafoc +Dafod +Dafoe +Dafof +Dafog +Dafoh +Dafoi +Dafoj +Dafok +Dafol +Dafom +Dafon +Dafoo +Dafop +Dafoq +Dafor +Dafos +Dafot +Dafou +Dafov +Dafow +Dafox +Dafoy +Dafoz +Dafpa +Dafpb +Dafpc +Dafpd +Dafpe +Dafpf +Dafpg +Dafph +Dafpi +Dafpj +Dafpk +Dafpl +Dafpm +Dafpn +Dafpo +Dafpp +Dafpq +Dafpr +Dafps +Dafpt +Dafpu +Dafpv +Dafpw +Dafpx +Dafpy +Dafpz +Dafqa +Dafqb +Dafqc +Dafqd +Dafqe +Dafqf +Dafqg +Dafqh +Dafqi +Dafqj +Dafqk +Dafql +Dafqm +Dafqn +Dafqo +Dafqp +Dafqq +Dafqr +Dafqs +Dafqt +Dafqu +Dafqv +Dafqw +Dafqx +Dafqy +Dafqz +Dafra +Dafrb +Dafrc +Dafrd +Dafre +Dafrf +Dafrg +Dafrh +Dafri +Dafrj +Dafrk +Dafrl +Dafrm +Dafrn +Dafro +Dafrp +Dafrq +Dafrr +Dafrs +Dafrt +Dafru +Dafrv +Dafrw +Dafrx +Dafry +Dafrz +Dafsa +Dafsb +Dafsc +Dafsd +Dafse +Dafsf +Dafsg +Dafsh +Dafsi +Dafsj +Dafsk +Dafsl +Dafsm +Dafsn +Dafso +Dafsp +Dafsq +Dafsr +Dafss +Dafst +Dafsu +Dafsv +Dafsw +Dafsx +Dafsy +Dafsz +Dafta +Daftb +Daftc +Daftd +Dafte +Daftf +Daftg +Dafth +Dafti +Daftj +Daftk +Daftl +Daftm +Daftn +Dafto +Daftp +Daftq +Daftr +Dafts +Daftt +Daftu +Daftv +Daftw +Daftx +Dafty +Daftz +Dafua +Dafub +Dafuc +Dafud +Dafue +Dafuf +Dafug +Dafuh +Dafui +Dafuj +Dafuk +Daful +Dafum +Dafun +Dafuo +Dafup +Dafuq +Dafur diff --git a/tests/strings/001.phpt b/tests/strings/001.phpt new file mode 100644 index 0000000000..0f6103f5e3 --- /dev/null +++ b/tests/strings/001.phpt @@ -0,0 +1,210 @@ +--TEST-- +String functions +--POST-- +--GET-- +--FILE-- +<?php + +error_reporting(0); + +echo "Testing strtok: "; + +$str = "testing 1/2\\3"; +$tok1 = strtok($str, " "); +$tok2 = strtok("/"); +$tok3 = strtok("\\"); +$tok4 = strtok("."); +if ($tok1 != "testing") { + echo("failed 1\n"); +} elseif ($tok2 != "1") { + echo("failed 2\n"); +} elseif ($tok3 != "2") { + echo("failed 3\n"); +} elseif ($tok4 != "3") { + echo("failed 4\n"); +} else { + echo("passed\n"); +} + +echo "Testing strstr: "; +$test = "This is a test"; +$found1 = strstr($test, 32); +$found2 = strstr($test, "a "); +if ($found1 != " is a test") { + echo("failed 1\n"); +} elseif ($found2 != "a test") { + echo("failed 2\n"); +} else { + echo("passed\n"); +} + +echo "Testing strrchr: "; +$test = "fola fola blakken"; +$found1 = strrchr($test, "b"); +$found2 = strrchr($test, 102); +if ($found1 != "blakken") { + echo("failed 1\n"); +} elseif ($found2 != "fola blakken") { + echo("failed 2\n"); +} +else { + echo("passed\n"); +} + +echo "Testing strtoupper: "; +$test = "abCdEfg"; +$upper = strtoupper($test); +if ($upper == "ABCDEFG") { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo "Testing strtolower: "; +$test = "ABcDeFG"; +$lower = strtolower($test); +if ($lower == "abcdefg") { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo "Testing substr: "; +$tests = $ok = 0; +$string = "string12345"; +$tests++; if (substr($string, 2, 10) == "ring12345") { $ok++; } +$tests++; if (substr($string, 4, 7) == "ng12345") { $ok++; } +$tests++; if (substr($string, 4) == "ng12345") { $ok++; } +$tests++; if (substr($string, 10, 2) == "5") { $ok++; } +$tests++; if (substr($string, 6, 0) == "") { $ok++; } +$tests++; if (substr($string, -2, 2) == "45") { $ok++; } +$tests++; if (substr($string, 1, -1) == "tring1234") { $ok++; } +$tests++; if (substr($string, -1, -2) == "") { $ok++; } +$tests++; if (substr($string, -3, -2) == "3") { $ok++; } + +if ($tests == $ok) { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +$raw = ' !"#$%&\'()*+,-./0123456789:;<=>?' + . '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_' + . '`abcdefghijklmnopqrstuvwxyz{|}~' + . "\0"; + +echo "Testing rawurlencode: "; +$encoded = rawurlencode($raw); +$correct = '%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F' + . '%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_' + . '%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E' + . '%00'; +if ($encoded == $correct) { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo "Testing rawurldecode: "; +$decoded = rawurldecode($correct); +if ($decoded == $raw) { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo "Testing urlencode: "; +$encoded = urlencode($raw); +$correct = '+%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F' + . '%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_' + . '%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E' + . '%00'; +if ($encoded == $correct) { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo "Testing urldecode: "; +$decoded = urldecode($correct); +if ($decoded == $raw) { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo "Testing quotemeta: "; +$raw = "a.\\+*?" . chr(91) . "^" . chr(93) . "b\$c"; +$quoted = quotemeta($raw); +if ($quoted == "a\\.\\\\\\+\\*\\?\\[\\^\\]b\\\$c") { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo "Testing ufirst: "; +$str = "fahrvergnuegen"; +$uc = ucfirst($str); +if ($uc == "Fahrvergnuegen") { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo "Testing strtr: "; +$str = "test abcdefgh"; +$tr = strtr($str, "def", "456"); +if ($tr == "t5st abc456gh") { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo "Testing addslashes: "; +$str = "\"\\'"; +$as = addslashes($str); +if ($as == "\\\"\\\\\\'") { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +echo "Testing stripslashes: "; +$str = "\$\\'"; +$ss = stripslashes($str); +if ($ss == "\$'") { + echo("passed\n"); +} else { + echo("failed!\n"); +} + + +echo "Testing uniqid: "; +$str = "prefix"; +$ui1 = uniqid($str); +$ui2 = uniqid($str); +if (strlen($ui1) == strlen($ui2) && strlen($ui1) == 19 && $ui1 != $ui2) { + echo("passed\n"); +} else { + echo("failed!\n"); +} + +?> +--EXPECT-- + +Testing strtok: passed +Testing strstr: passed +Testing strrchr: passed +Testing strtoupper: passed +Testing strtolower: passed +Testing substr: passed +Testing rawurlencode: passed +Testing rawurldecode: passed +Testing urlencode: passed +Testing urldecode: passed +Testing quotemeta: passed +Testing ufirst: passed +Testing strtr: passed +Testing addslashes: passed +Testing stripslashes: passed +Testing uniqid: passed diff --git a/tests/strings/002.phpt b/tests/strings/002.phpt new file mode 100644 index 0000000000..06ca6c491c --- /dev/null +++ b/tests/strings/002.phpt @@ -0,0 +1,67 @@ +--TEST-- +Formatted print functions +--POST-- +--GET-- +--FILE-- +<?php + +error_reporting(0); + +printf("printf test 1:%s\n", "simple string"); +printf("printf test 2:%d\n", 42); +printf("printf test 3:%f\n", 10.0/3); +printf("printf test 4:%.10f\n", 10.0/3); +printf("printf test 5:%-10.2f\n", 2.5); +printf("printf test 6:%-010.2f\n", 2.5); +printf("printf test 7:%010.2f\n", 2.5); +printf("printf test 8:<%20s>\n", "foo"); +printf("printf test 9:<%-20s>\n", "bar"); +printf("printf test 10: 123456789012345\n"); +printf("printf test 10:<%15s>\n", "høyesterettsjustitiarius"); +printf("printf test 11: 123456789012345678901234567890\n"); +printf("printf test 11:<%30s>\n", "høyesterettsjustitiarius"); +printf("printf test 12:%5.2f\n", -12.34); +printf("printf test 13:%5d\n", -12); +printf("printf test 14:%c\n", 64); +printf("printf test 15:%b\n", 170); +printf("printf test 16:%x\n", 170); +printf("printf test 17:%X\n", 170); +printf("printf test 18:%16b\n", 170); +printf("printf test 19:%16x\n", 170); +printf("printf test 20:%16X\n", 170); +printf("printf test 21:%016b\n", 170); +printf("printf test 22:%016x\n", 170); +printf("printf test 23:%016X\n", 170); +printf("printf test 24:%.5s\n", "abcdefghij"); +printf("printf test 25:%-2s\n", "gazonk"); + +?> +--EXPECT-- + +printf test 1:simple string +printf test 2:42 +printf test 3:3.333333 +printf test 4:3.3333333333 +printf test 5:2.50 +printf test 6:2.50000000000 +printf test 7:0000000002.50 +printf test 8:< foo> +printf test 9:<bar > +printf test 10: 123456789012345 +printf test 10:<høyesterettsjustitiarius> +printf test 11: 123456789012345678901234567890 +printf test 11:< høyesterettsjustitiarius> +printf test 12: -12.34 +printf test 13: -12 +printf test 14:@ +printf test 15:10101010 +printf test 16:aa +printf test 17:AA +printf test 18: 10101010 +printf test 19: aa +printf test 20: AA +printf test 21:0000000010101010 +printf test 22:00000000000000aa +printf test 23:00000000000000AA +printf test 24:abcde +printf test 25:gazonk diff --git a/tests/strings/003.phpt b/tests/strings/003.phpt new file mode 100644 index 0000000000..8c378df8ab --- /dev/null +++ b/tests/strings/003.phpt @@ -0,0 +1,14 @@ +--TEST-- +HTML entities +--POST-- +--GET-- +--FILE-- +<?php +setlocale ("LC_CTYPE", "C"); +echo htmlspecialchars ("<>\"&åÄ\n"); +echo htmlentities ("<>\"&åÄ\n"); +?> +--EXPECT-- + +<>"&åÄ +<>"&åÄ |