diff options
Diffstat (limited to 'tests')
289 files changed, 0 insertions, 24582 deletions
diff --git a/tests/basic/001.phpt b/tests/basic/001.phpt deleted file mode 100644 index 4cc79613c5..0000000000 --- a/tests/basic/001.phpt +++ /dev/null @@ -1,8 +0,0 @@ ---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 deleted file mode 100644 index 5a6187df7b..0000000000 --- a/tests/basic/002.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Simple POST Method test ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> ---POST-- -a=Hello+World ---GET-- ---FILE-- -<?php -echo $_POST['a']; ?> ---EXPECT-- -Hello World diff --git a/tests/basic/003.phpt b/tests/basic/003.phpt deleted file mode 100644 index ae6603f448..0000000000 --- a/tests/basic/003.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -GET and POST Method combined ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> ---POST-- -a=Hello+World ---GET-- -b=Hello+Again+World&c=Hi+Mom ---FILE-- -<?php -error_reporting(0); -echo "post-a=({$_POST['a']}) get-b=({$_GET['b']}) get-c=({$_GET['c']})"?> ---EXPECT-- -post-a=(Hello World) get-b=(Hello Again World) get-c=(Hi Mom) diff --git a/tests/basic/004.phpt b/tests/basic/004.phpt deleted file mode 100644 index 1689d73f59..0000000000 --- a/tests/basic/004.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -Two variables in POST data ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> ---POST-- -a=Hello+World&b=Hello+Again+World ---GET-- ---FILE-- -<?php -error_reporting(0); -echo "{$_POST['a']} {$_POST['b']}" ?> ---EXPECT-- -Hello World Hello Again World diff --git a/tests/basic/005.phpt b/tests/basic/005.phpt deleted file mode 100644 index 28c1997762..0000000000 --- a/tests/basic/005.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -Three variables in POST data ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> ---POST-- -a=Hello+World&b=Hello+Again+World&c=1 ---GET-- ---FILE-- -<?php -error_reporting(0); -echo "{$_POST['a']} {$_POST['b']} {$_POST['c']}"?> ---EXPECT-- -Hello World Hello Again World 1 diff --git a/tests/basic/006.phpt b/tests/basic/006.phpt deleted file mode 100644 index 3b88acc32f..0000000000 --- a/tests/basic/006.phpt +++ /dev/null @@ -1,8 +0,0 @@ ---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 deleted file mode 100644 index 90fdc7e545..0000000000 --- a/tests/basic/007.phpt +++ /dev/null @@ -1,8 +0,0 @@ ---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 deleted file mode 100644 index 927bf0e509..0000000000 --- a/tests/basic/008.phpt +++ /dev/null @@ -1,8 +0,0 @@ ---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 deleted file mode 100644 index d78b195d0b..0000000000 --- a/tests/basic/009.phpt +++ /dev/null @@ -1,8 +0,0 @@ ---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 deleted file mode 100644 index 4440d99bf8..0000000000 --- a/tests/basic/010.phpt +++ /dev/null @@ -1,8 +0,0 @@ ---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 deleted file mode 100644 index 34eed7915a..0000000000 --- a/tests/basic/011.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Testing $argc and $argv handling (GET) ---SKIPIF-- -<?php if (php_sapi_name()=='cli') echo 'skip'; ?> ---INI-- -register_argc_argv=1 ---GET-- -ab+cd+ef+123+test ---FILE-- -<?php - -if (!ini_get('register_globals')) { - $argc = $_SERVER['argc']; - $argv = $_SERVER['argv']; -} - -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/basic/012.phpt b/tests/basic/012.phpt deleted file mode 100644 index 3297853286..0000000000 --- a/tests/basic/012.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Testing $argc and $argv handling (cli) ---SKIPIF-- -<?php if(php_sapi_name()!='cli') echo 'skip'; ?> ---INI-- -register_argc_argv=1 -variables_order=GPS ---ARGS-- -ab cd ef 123 test ---FILE-- -<?php - -if (!ini_get('register_globals')) { - $argc = $_SERVER['argc']; - $argv = $_SERVER['argv']; -} - -for ($i=1; $i<$argc; $i++) { - echo ($i-1).": ".$argv[$i]."\n"; -} - -?> ---EXPECT-- -0: ab -1: cd -2: ef -3: 123 -4: test diff --git a/tests/basic/bug20539.phpt b/tests/basic/bug20539.phpt deleted file mode 100644 index 6352960991..0000000000 --- a/tests/basic/bug20539.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -Bug #20539 (PHP CLI Segmentation Fault) ---INI-- -session.auto_start=1 ---FILE-- -<?php - print "good :)\n"; -?> ---EXPECT-- -good :) diff --git a/tests/bin-info.inc b/tests/bin-info.inc deleted file mode 100644 index ad42ea897a..0000000000 --- a/tests/bin-info.inc +++ /dev/null @@ -1,21 +0,0 @@ -<?php -// Used to print php binary info used to run -// test scripts. -// Called from run-tests.php - -function dowrite($str) -{ - global $term_bold, $term_norm; - $str = str_replace("%b", $term_bold, $str); - $str = str_replace("%B", $term_norm, $str); - print $str; -} - -function dowriteln($str) -{ - dowrite("$str\n"); -} - -dowriteln("PHP SAPI: ".PHP_SAPI); -dowriteln("PHP Version: ".PHP_VERSION); -?>
\ No newline at end of file diff --git a/tests/classes/__call_001.phpt b/tests/classes/__call_001.phpt deleted file mode 100644 index f9708e04f1..0000000000 --- a/tests/classes/__call_001.phpt +++ /dev/null @@ -1,42 +0,0 @@ ---TEST-- -ZE2 __call() ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class Caller { - public $x = array(1, 2, 3); - - function __call($m, $a) { - echo "Method $m called:\n"; - var_dump($a); - return $this->x; - } -} - -$foo = new Caller(); -$a = $foo->test(1, '2', 3.4, true); -var_dump($a); - -?> ---EXPECT-- -Method test called: -array(4) { - [0]=> - int(1) - [1]=> - string(1) "2" - [2]=> - float(3.4) - [3]=> - bool(true) -} -array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) -} diff --git a/tests/classes/__clone_001.phpt b/tests/classes/__clone_001.phpt deleted file mode 100644 index fe320df468..0000000000 --- a/tests/classes/__clone_001.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -ZE2 __clone() ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class MyCloneable { - static $id = 0; - - function MyCloneable() { - $this->id = self::$id++; - } - - function __clone() { - $this->name = $that->name; - $this->address = "New York"; - $this->id = self::$id++; - } -} - -$original = new MyCloneable(); - -$original->name = "Hello"; -$original->address = "Tel-Aviv"; - -echo $original->id . "\n"; - -$clone = $original->__clone(); - -echo $clone->id . "\n"; -echo $clone->name . "\n"; -echo $clone->address . "\n"; - -?> ---EXPECT-- -0 -1 -Hello -New York diff --git a/tests/classes/__set__get_001.phpt b/tests/classes/__set__get_001.phpt deleted file mode 100644 index beb688c222..0000000000 --- a/tests/classes/__set__get_001.phpt +++ /dev/null @@ -1,72 +0,0 @@ ---TEST-- -ZE2 __set() and __get() ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class setter { - public $n; - public $x = array('a' => 1, 'b' => 2, 'c' => 3); - - function __get($nm) { - echo "Getting [$nm]\n"; - - if (isset($this->x[$nm])) { - $r = $this->x[$nm]; - echo "Returning: $r\n"; - return $r; - } - else { - echo "Nothing!\n"; - } - } - - function __set($nm, $val) { - echo "Setting [$nm] to $val\n"; - - if (isset($this->x[$nm])) { - $this->x[$nm] = $val; - echo "OK!\n"; - } - else { - echo "Not OK!\n"; - } - } -} - -$foo = new Setter(); - -// this doesn't go through __set()... should it? -$foo->n = 1; - -// the rest are fine... -$foo->a = 100; -$foo->a++; -$foo->z++; -var_dump($foo); - -?> ---EXPECTF-- -Setting [a] to 100 -OK! -Getting [a] -Returning: 100 -Setting [a] to 101 -OK! -Getting [z] -Nothing! -Setting [z] to 1 -Not OK! -object(setter)#%d (2) { - ["n"]=> - int(1) - ["x"]=> - array(3) { - ["a"]=> - int(101) - ["b"]=> - int(2) - ["c"]=> - int(3) - } -} diff --git a/tests/classes/abstract.phpt b/tests/classes/abstract.phpt deleted file mode 100644 index fbebf4da73..0000000000 --- a/tests/classes/abstract.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -ZE2 An abstract method may not be called ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -abstract class fail { - abstract function show(); -} - -class pass extends fail { - function show() { - echo "Call to function show()\n"; - } - function error() { - parent::show(); - } -} - -$t = new pass(); -$t->show(); -$t->error(); - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call to function show() - -Fatal error: Cannot call abstract method fail::show() in %s on line %d diff --git a/tests/classes/abstract_class.phpt b/tests/classes/abstract_class.phpt deleted file mode 100644 index 571a9b9581..0000000000 --- a/tests/classes/abstract_class.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -ZE2 An abstract class cannot be instantiated ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -abstract class fail { - abstract function show(); -} - -class pass extends fail { - function show() { - echo "Call to function show()\n"; - } -} - -$t2 = new pass(); -$t2->show(); - -$t = new fail(); -$t->show(); - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call to function show() - -Fatal error: Cannot instantiate abstract class fail in %s on line %d diff --git a/tests/classes/abstract_final.phpt b/tests/classes/abstract_final.phpt deleted file mode 100644 index 20c7ae375f..0000000000 --- a/tests/classes/abstract_final.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -ZE2 A final method cannot be abstract ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class fail { - abstract final function show(); -} - -echo "Done\n"; // Shouldn't be displayed -?> ---EXPECTF-- - -Fatal error: Cannot use the final modifier on an abstract class member in %s on line %d diff --git a/tests/classes/abstract_inherit.phpt b/tests/classes/abstract_inherit.phpt deleted file mode 100644 index 362ccb0b76..0000000000 --- a/tests/classes/abstract_inherit.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -ZE2 A class that inherits an abstract method is abstract ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -abstract class pass { - abstract function show(); -} - -abstract class fail extends pass { -} - -$t = new fail(); -$t = new pass(); - -echo "Done\n"; // Shouldn't be displayed -?> ---EXPECTF-- - -Fatal error: Cannot instantiate abstract class fail in %s on line %d diff --git a/tests/classes/abstract_not_declared.phpt b/tests/classes/abstract_not_declared.phpt deleted file mode 100644 index 96c98857e3..0000000000 --- a/tests/classes/abstract_not_declared.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -ZE2 An abstract class must be declared abstract ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class fail { - abstract function show(); -} - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Fatal error: Class fail contains 1 abstract methods and must therefore be declared abstract (fail::show) in %s on line %d diff --git a/tests/classes/abstract_redeclare.phpt b/tests/classes/abstract_redeclare.phpt deleted file mode 100644 index fc6537781b..0000000000 --- a/tests/classes/abstract_redeclare.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -ZE2 A method cannot be redeclared abstract ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - function show() { - echo "Call to function show()\n"; - } -} - -class fail extends pass { - abstract function show(); -} - -echo "Done\n"; // Shouldn't be displayed -?> ---EXPECTF-- - -Fatal error: Cannot make non abstract method pass::show() abstract in class fail in %s on line %d diff --git a/tests/classes/abstract_static.phpt b/tests/classes/abstract_static.phpt deleted file mode 100644 index 2e46e9dc06..0000000000 --- a/tests/classes/abstract_static.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -ZE2 A static abstrcat method may not be called ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -abstract class fail { - abstract static function show(); -} - -class pass extends fail { - static function show() { - echo "Call to function show()\n"; - } -} - -pass::show(); -fail::show(); - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call to function show() - -Fatal error: Cannot call abstract method fail::show() in %s on line %d diff --git a/tests/classes/array_access_001.phpt b/tests/classes/array_access_001.phpt deleted file mode 100644 index 8a670c1c24..0000000000 --- a/tests/classes/array_access_001.phpt +++ /dev/null @@ -1,198 +0,0 @@ ---TEST-- -ZE2 ArrayAccess ---SKIPIF-- -<?php - if (!class_exists('ArrayAccess')) die('skip ArrayAccess not present'); -?> ---FILE-- -<?php -class object implements ArrayAccess { - - public $a = array('1st', 1, 2=>'3rd', '4th'=>4); - - function offsetExists($index) { - echo __METHOD__ . "($index)\n"; - return array_key_exists($index, $this->a); - } - function offsetGet($index) { - echo __METHOD__ . "($index)\n"; - return $this->a[$index]; - } - function offsetSet($index, $newval) { - echo __METHOD__ . "($index,$newval)\n"; - return $this->a[$index] = $newval; - } - function offsetUnset($index) { - echo __METHOD__ . "($index)\n"; - unset($this->a[$index]); - } -} - -$obj = new Object; - -var_dump($obj->a); - -echo "===EMPTY===\n"; -var_dump(empty($obj[0])); -var_dump(empty($obj[1])); -var_dump(empty($obj[2])); -var_dump(empty($obj['4th'])); -var_dump(empty($obj['5th'])); -var_dump(empty($obj[6])); - -echo "===isset===\n"; -var_dump(isset($obj[0])); -var_dump(isset($obj[1])); -var_dump(isset($obj[2])); -var_dump(isset($obj['4th'])); -var_dump(isset($obj['5th'])); -var_dump(isset($obj[6])); - -echo "===offsetGet===\n"; -var_dump($obj[0]); -var_dump($obj[1]); -var_dump($obj[2]); -var_dump($obj['4th']); -var_dump($obj['5th']); -var_dump($obj[6]); - -echo "===offsetSet===\n"; -echo "WRITE 1\n"; -$obj[1] = 'Changed 1'; -var_dump($obj[1]); -echo "WRITE 2\n"; -$obj['4th'] = 'Changed 4th'; -var_dump($obj['4th']); -echo "WRITE 3\n"; -$obj['5th'] = 'Added 5th'; -var_dump($obj['5th']); -echo "WRITE 4\n"; -$obj[6] = 'Added 6'; -var_dump($obj[6]); - -var_dump($obj[0]); -var_dump($obj[2]); - -$x = $obj[6] = 'changed 6'; -var_dump($obj[6]); -var_dump($x); - -echo "===unset===\n"; -var_dump($obj->a); -unset($obj[2]); -unset($obj['4th']); -unset($obj[7]); -unset($obj['8th']); -var_dump($obj->a); - -?> -===DONE=== ---EXPECTF-- -array(4) { - [0]=> - string(3) "1st" - [1]=> - int(1) - [2]=> - string(3) "3rd" - ["4th"]=> - int(4) -} -===EMPTY=== -object::offsetExists(0) -bool(false) -object::offsetExists(1) -bool(false) -object::offsetExists(2) -bool(false) -object::offsetExists(4th) -bool(false) -object::offsetExists(5th) -bool(true) -object::offsetExists(6) -bool(true) -===isset=== -object::offsetExists(0) -bool(true) -object::offsetExists(1) -bool(true) -object::offsetExists(2) -bool(true) -object::offsetExists(4th) -bool(true) -object::offsetExists(5th) -bool(false) -object::offsetExists(6) -bool(false) -===offsetGet=== -object::offsetGet(0) -string(3) "1st" -object::offsetGet(1) -int(1) -object::offsetGet(2) -string(3) "3rd" -object::offsetGet(4th) -int(4) -object::offsetGet(5th) - -Notice: Undefined index: 5th in %sarray_access_001.php on line %d -NULL -object::offsetGet(6) - -Notice: Undefined offset: 6 in %sarray_access_001.php on line %d -NULL -===offsetSet=== -WRITE 1 -object::offsetSet(1,Changed 1) -object::offsetGet(1) -string(9) "Changed 1" -WRITE 2 -object::offsetSet(4th,Changed 4th) -object::offsetGet(4th) -string(11) "Changed 4th" -WRITE 3 -object::offsetSet(5th,Added 5th) -object::offsetGet(5th) -string(9) "Added 5th" -WRITE 4 -object::offsetSet(6,Added 6) -object::offsetGet(6) -string(7) "Added 6" -object::offsetGet(0) -string(3) "1st" -object::offsetGet(2) -string(3) "3rd" -object::offsetSet(6,changed 6) -object::offsetGet(6) -string(9) "changed 6" -string(9) "changed 6" -===unset=== -array(6) { - [0]=> - string(3) "1st" - [1]=> - string(9) "Changed 1" - [2]=> - string(3) "3rd" - ["4th"]=> - string(11) "Changed 4th" - ["5th"]=> - string(9) "Added 5th" - [6]=> - string(9) "changed 6" -} -object::offsetUnset(2) -object::offsetUnset(4th) -object::offsetUnset(7) -object::offsetUnset(8th) -array(4) { - [0]=> - string(3) "1st" - [1]=> - string(9) "Changed 1" - ["5th"]=> - string(9) "Added 5th" - [6]=> - string(9) "changed 6" -} -===DONE=== diff --git a/tests/classes/array_access_002.phpt b/tests/classes/array_access_002.phpt deleted file mode 100644 index 584227ee89..0000000000 --- a/tests/classes/array_access_002.phpt +++ /dev/null @@ -1,198 +0,0 @@ ---TEST-- -ZE2 ArrayAccess::offsetSet without return ---SKIPIF-- -<?php - if (!class_exists('ArrayAccess')) die('skip ArrayAccess not present'); -?> ---FILE-- -<?php -class object implements ArrayAccess { - - public $a = array('1st', 1, 2=>'3rd', '4th'=>4); - - function offsetExists($index) { - echo __METHOD__ . "($index)\n"; - return array_key_exists($index, $this->a); - } - function offsetGet($index) { - echo __METHOD__ . "($index)\n"; - return $this->a[$index]; - } - function offsetSet($index, $newval) { - echo __METHOD__ . "($index,$newval)\n"; - /*return*/ $this->a[$index] = $newval; - } - function offsetUnset($index) { - echo __METHOD__ . "($index)\n"; - unset($this->a[$index]); - } -} - -$obj = new Object; - -var_dump($obj->a); - -echo "===EMPTY===\n"; -var_dump(empty($obj[0])); -var_dump(empty($obj[1])); -var_dump(empty($obj[2])); -var_dump(empty($obj['4th'])); -var_dump(empty($obj['5th'])); -var_dump(empty($obj[6])); - -echo "===isset===\n"; -var_dump(isset($obj[0])); -var_dump(isset($obj[1])); -var_dump(isset($obj[2])); -var_dump(isset($obj['4th'])); -var_dump(isset($obj['5th'])); -var_dump(isset($obj[6])); - -echo "===offsetGet===\n"; -var_dump($obj[0]); -var_dump($obj[1]); -var_dump($obj[2]); -var_dump($obj['4th']); -var_dump($obj['5th']); -var_dump($obj[6]); - -echo "===offsetSet===\n"; -echo "WRITE 1\n"; -$obj[1] = 'Changed 1'; -var_dump($obj[1]); -echo "WRITE 2\n"; -$obj['4th'] = 'Changed 4th'; -var_dump($obj['4th']); -echo "WRITE 3\n"; -$obj['5th'] = 'Added 5th'; -var_dump($obj['5th']); -echo "WRITE 4\n"; -$obj[6] = 'Added 6'; -var_dump($obj[6]); - -var_dump($obj[0]); -var_dump($obj[2]); - -$x = $obj[6] = 'changed 6'; -var_dump($obj[6]); -var_dump($x); - -echo "===unset===\n"; -var_dump($obj->a); -unset($obj[2]); -unset($obj['4th']); -unset($obj[7]); -unset($obj['8th']); -var_dump($obj->a); - -?> -===DONE=== ---EXPECTF-- -array(4) { - [0]=> - string(3) "1st" - [1]=> - int(1) - [2]=> - string(3) "3rd" - ["4th"]=> - int(4) -} -===EMPTY=== -object::offsetExists(0) -bool(false) -object::offsetExists(1) -bool(false) -object::offsetExists(2) -bool(false) -object::offsetExists(4th) -bool(false) -object::offsetExists(5th) -bool(true) -object::offsetExists(6) -bool(true) -===isset=== -object::offsetExists(0) -bool(true) -object::offsetExists(1) -bool(true) -object::offsetExists(2) -bool(true) -object::offsetExists(4th) -bool(true) -object::offsetExists(5th) -bool(false) -object::offsetExists(6) -bool(false) -===offsetGet=== -object::offsetGet(0) -string(3) "1st" -object::offsetGet(1) -int(1) -object::offsetGet(2) -string(3) "3rd" -object::offsetGet(4th) -int(4) -object::offsetGet(5th) - -Notice: Undefined index: 5th in %sarray_access_002.php on line %d -NULL -object::offsetGet(6) - -Notice: Undefined offset: 6 in %sarray_access_002.php on line %d -NULL -===offsetSet=== -WRITE 1 -object::offsetSet(1,Changed 1) -object::offsetGet(1) -string(9) "Changed 1" -WRITE 2 -object::offsetSet(4th,Changed 4th) -object::offsetGet(4th) -string(11) "Changed 4th" -WRITE 3 -object::offsetSet(5th,Added 5th) -object::offsetGet(5th) -string(9) "Added 5th" -WRITE 4 -object::offsetSet(6,Added 6) -object::offsetGet(6) -string(7) "Added 6" -object::offsetGet(0) -string(3) "1st" -object::offsetGet(2) -string(3) "3rd" -object::offsetSet(6,changed 6) -object::offsetGet(6) -string(9) "changed 6" -string(9) "changed 6" -===unset=== -array(6) { - [0]=> - string(3) "1st" - [1]=> - string(9) "Changed 1" - [2]=> - string(3) "3rd" - ["4th"]=> - string(11) "Changed 4th" - ["5th"]=> - string(9) "Added 5th" - [6]=> - string(9) "changed 6" -} -object::offsetUnset(2) -object::offsetUnset(4th) -object::offsetUnset(7) -object::offsetUnset(8th) -array(4) { - [0]=> - string(3) "1st" - [1]=> - string(9) "Changed 1" - ["5th"]=> - string(9) "Added 5th" - [6]=> - string(9) "changed 6" -} -===DONE=== diff --git a/tests/classes/array_access_003.phpt b/tests/classes/array_access_003.phpt deleted file mode 100644 index 538ca07276..0000000000 --- a/tests/classes/array_access_003.phpt +++ /dev/null @@ -1,61 +0,0 @@ ---TEST-- -ZE2 ArrayAccess::offsetGet ambiguties ---SKIPIF-- -<?php - if (!class_exists('ArrayAccess')) die('skip ArrayAccess not present'); -?> ---FILE-- -<?php -class object implements ArrayAccess { - - public $a = array('1st', 1, 2=>'3rd', '4th'=>4); - - function offsetExists($index) { - echo __METHOD__ . "($index)\n"; - return array_key_exists($index, $this->a); - } - function &offsetGet($index) { - echo __METHOD__ . "($index)\n"; - switch($index) { - case 1: - $a = 'foo'; - return $a . 'Bar'; - case 2: - static $a=1; - return $a; - } - return $this->a[$index]; - } - function offsetSet($index, $newval) { - echo __METHOD__ . "($index,$newval)\n"; - if ($index==3) { - $this->cnt = $newval; - } - return $this->a[$index] = $newval; - } - function offsetUnset($index) { - echo __METHOD__ . "($index)\n"; - unset($this->a[$index]); - } -} - -$obj = new Object; - -var_dump($obj[1]); -var_dump($obj[2]); -$obj[2]++; -var_dump($obj[2]); - -?> -===DONE=== ---EXPECTF-- -object::offsetGet(1) - -Strict Standards: Only variable references should be returned by reference in %sarray_access_003.php on line %d -string(6) "fooBar" -object::offsetGet(2) -int(1) -object::offsetGet(2) -object::offsetGet(2) -int(2) -===DONE=== diff --git a/tests/classes/array_access_004.phpt b/tests/classes/array_access_004.phpt deleted file mode 100644 index eec6c80d30..0000000000 --- a/tests/classes/array_access_004.phpt +++ /dev/null @@ -1,58 +0,0 @@ ---TEST-- -ZE2 ArrayAccess::offsetGet ambiguties ---SKIPIF-- -<?php - if (!class_exists('ArrayAccess')) die('skip ArrayAccess not present'); -?> ---FILE-- -<?php -class object implements ArrayAccess { - - public $a = array('1st', 1, 2=>'3rd', '4th'=>4); - - function offsetExists($index) { - echo __METHOD__ . "($index)\n"; - return array_key_exists($index, $this->a); - } - function offsetGet($index) { - echo __METHOD__ . "($index)\n"; - switch($index) { - case 1: - $a = 'foo'; - return $a . 'Bar'; - case 2: - static $a=1; - return $a; - } - return $this->a[$index]; - } - function offsetSet($index, $newval) { - echo __METHOD__ . "($index,$newval)\n"; - if ($index==3) { - $this->cnt = $newval; - } - return $this->a[$index] = $newval; - } - function offsetUnset($index) { - echo __METHOD__ . "($index)\n"; - unset($this->a[$index]); - } -} - -$obj = new Object; - -var_dump($obj[1]); -var_dump($obj[2]); -$obj[2]++; -var_dump($obj[2]); - -?> -===DONE=== ---EXPECTF-- -object::offsetGet(1) -string(6) "fooBar" -object::offsetGet(2) -int(1) -object::offsetGet(2) - -Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_004.php on line %d diff --git a/tests/classes/array_access_005.phpt b/tests/classes/array_access_005.phpt deleted file mode 100755 index be808691b9..0000000000 --- a/tests/classes/array_access_005.phpt +++ /dev/null @@ -1,58 +0,0 @@ ---TEST-- -ZE2 ArrayAccess and sub Arrays ---FILE-- -<?php - -class Peoples implements ArrayAccess { - public $person; - - function __construct() { - $this->person = array(array('name'=>'Joe')); - } - - function offsetExists($index) { - return array_key_exists($this->person, $index); - } - - function offsetGet($index) { - return $this->person[$index]; - } - - function offsetSet($index, $value) { - $this->person[$index] = $value; - } - - function offsetUnset($index) { - unset($this->person[$index]); - } -} - -$people = new Peoples; - -var_dump($people->person[0]['name']); -$people->person[0]['name'] = $people->person[0]['name'] . 'Foo'; -var_dump($people->person[0]['name']); -$people->person[0]['name'] .= 'Bar'; -var_dump($people->person[0]['name']); - -echo "---ArrayOverloading---\n"; - -$people = new Peoples; - -var_dump($people[0]['name']); -$people[0]['name'] = $people->person[0]['name'] . 'Foo'; -var_dump($people[0]['name']); -$people[0]['name'] .= 'Bar'; -var_dump($people[0]['name']); - -echo "---Done---\n"; -?> ---EXPECT-- -string(3) "Joe" -string(6) "JoeFoo" -string(9) "JoeFooBar" ----ArrayOverloading--- -string(3) "Joe" -string(6) "JoeFoo" -string(9) "JoeFooBar" ----Done--- diff --git a/tests/classes/array_access_006.phpt b/tests/classes/array_access_006.phpt deleted file mode 100644 index 342a7e5107..0000000000 --- a/tests/classes/array_access_006.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -ZE2 ArrayAccess and ASSIGN_OP operators (+=) ---FILE-- -<?php - -class OverloadedArray implements ArrayAccess { - public $realArray; - - function __construct() { - $this->realArray = array(1,2,3); - } - - function offsetExists($index) { - return array_key_exists($this->realArray, $index); - } - - function offsetGet($index) { - return $this->realArray[$index]; - } - - function offsetSet($index, $value) { - $this->realArray[$index] = $value; - } - - function offsetUnset($index) { - unset($this->realArray[$index]); - } -} - -$a = new OverloadedArray; -$a[1] += 10; -var_dump($a[1]); -echo "---Done---\n"; -?> ---EXPECT-- -int(12) ----Done--- diff --git a/tests/classes/array_access_007.phpt b/tests/classes/array_access_007.phpt deleted file mode 100755 index 42187fe5d5..0000000000 --- a/tests/classes/array_access_007.phpt +++ /dev/null @@ -1,57 +0,0 @@ ---TEST-- -ZE2 ArrayAccess and [] assignment ---FILE-- -<?php - -class OverloadedArray implements ArrayAccess { - public $realArray; - - function __construct() { - $this->realArray = array(); - } - - function offsetExists($index) { - return array_key_exists($this->realArray, $index); - } - - function offsetGet($index) { - return $this->realArray[$index]; - } - - function offsetSet($index, $value) { - if (is_null($index)) { - $this->realArray[] = $value; - } else { - $this->realArray[$index] = $value; - } - } - - function offsetUnset($index) { - unset($this->realArray[$index]); - } - - function dump() { - var_dump($this->realArray); - } -} - -$a = new OverloadedArray; -$a[] = 1; -$a[1] = 2; -$a[2] = 3; -$a[] = 4; -$a->dump(); -?> -===DONE=== ---EXPECT-- -array(4) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) -} -===DONE=== diff --git a/tests/classes/assign_op_property_001.phpt b/tests/classes/assign_op_property_001.phpt deleted file mode 100644 index 54e519e8f6..0000000000 --- a/tests/classes/assign_op_property_001.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -ZE2 assign_op property of overloaded object ---FILE-- -<?php - -class Test { - private $real_a = 2; - - function __set($property, $value) { - if ($property = "a") { - $this->real_a = $value; - } - } - - function __get($property) { - if ($property = "a") { - return $this->real_a; - } - } -} - -$obj = new Test; -var_dump($obj->a); -$obj->a += 2; -var_dump($obj->a); -echo "---Done---\n"; -?> ---EXPECT-- -int(2) -int(4) ----Done--- diff --git a/tests/classes/autoload_001.phpt b/tests/classes/autoload_001.phpt deleted file mode 100755 index c26988e2c1..0000000000 --- a/tests/classes/autoload_001.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -ZE2 Autoload and class_exists ---SKIPIF-- -<?php - if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); - if (class_exists('autoload_root')) die('skip Autoload test classes exist already'); -?> ---FILE-- -<?php - -function __autoload($class_name) -{ - require_once(dirname(__FILE__) . '/' . $class_name . '.p5c'); - echo __FUNCTION__ . '(' . $class_name . ")\n"; -} - -var_dump(class_exists('autoload_root')); - -?> -===DONE=== ---EXPECT-- -__autoload(autoload_root) -bool(true) -===DONE=== diff --git a/tests/classes/autoload_002.phpt b/tests/classes/autoload_002.phpt deleted file mode 100755 index 9f60969a84..0000000000 --- a/tests/classes/autoload_002.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -ZE2 Autoload and get_class_methods ---SKIPIF-- -<?php - if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); - if (class_exists('autoload_root')) die('skip Autoload test classes exist already'); -?> ---FILE-- -<?php - -function __autoload($class_name) -{ - require_once(dirname(__FILE__) . '/' . $class_name . '.p5c'); - echo __FUNCTION__ . '(' . $class_name . ")\n"; -} - -var_dump(get_class_methods('autoload_root')); - -?> -===DONE=== ---EXPECT-- -__autoload(autoload_root) -array(1) { - [0]=> - string(12) "testFunction" -} -===DONE=== diff --git a/tests/classes/autoload_003.phpt b/tests/classes/autoload_003.phpt deleted file mode 100755 index 89ef629d63..0000000000 --- a/tests/classes/autoload_003.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -ZE2 Autoload and derived classes ---SKIPIF-- -<?php - if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); - if (class_exists('autoload_root')) die('skip Autoload test classes exist already'); -?> ---FILE-- -<?php - -function __autoload($class_name) -{ - require_once(dirname(__FILE__) . '/' . $class_name . '.p5c'); - echo __FUNCTION__ . '(' . $class_name . ")\n"; -} - -var_dump(class_exists('autoload_derived')); - -?> -===DONE=== ---EXPECT-- -__autoload(autoload_root) -__autoload(autoload_derived) -bool(true) -===DONE=== diff --git a/tests/classes/autoload_004.phpt b/tests/classes/autoload_004.phpt deleted file mode 100755 index 8b67a08711..0000000000 --- a/tests/classes/autoload_004.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -ZE2 Autoload and recursion ---SKIPIF-- -<?php - if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); - if (class_exists('autoload_root')) die('skip Autoload test classes exist already'); -?> ---FILE-- -<?php - -function __autoload($class_name) -{ - var_dump(class_exists($class_name)); - require_once(dirname(__FILE__) . '/' . $class_name . '.p5c'); - echo __FUNCTION__ . '(' . $class_name . ")\n"; -} - -var_dump(class_exists('autoload_derived')); - -?> -===DONE=== ---EXPECT-- -bool(false) -bool(false) -__autoload(autoload_root) -__autoload(autoload_derived) -bool(true) -===DONE=== diff --git a/tests/classes/autoload_derived.p5c b/tests/classes/autoload_derived.p5c deleted file mode 100755 index 93a4b3579a..0000000000 --- a/tests/classes/autoload_derived.p5c +++ /dev/null @@ -1,6 +0,0 @@ -<?php - -class autoload_derived extends autoload_root { -} - -?>
\ No newline at end of file diff --git a/tests/classes/autoload_root.p5c b/tests/classes/autoload_root.p5c deleted file mode 100755 index 9559d36d32..0000000000 --- a/tests/classes/autoload_root.p5c +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -class autoload_root { - function testFunction() - { - return true; - } -} - -?>
\ No newline at end of file diff --git a/tests/classes/bug23951.phpt b/tests/classes/bug23951.phpt deleted file mode 100644 index 2e272b87fe..0000000000 --- a/tests/classes/bug23951.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Bug #23951 (Defines not working in inherited classes) ---FILE-- -<?php - -define('FOO1', 1); -define('FOO2', 2); - -class A { - - public $a_var = array(FOO1=>'foo1_value', FOO2=>'foo2_value'); - -} - -class B extends A { - - public $b_var = 'foo'; - -} - -$a = new A; -$b = new B; - -print_r($a); -print_r($b->a_var); -print_r($b->b_var); - -?> ---EXPECT-- -A Object -( - [a_var] => Array - ( - [1] => foo1_value - [2] => foo2_value - ) - -) -Array -( - [1] => foo1_value - [2] => foo2_value -) -foo diff --git a/tests/classes/bug24399.phpt b/tests/classes/bug24399.phpt deleted file mode 100644 index fedf8e5d24..0000000000 --- a/tests/classes/bug24399.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Bug #24399 (is_subclass_of() crashes when parent class doesn't exist) ---FILE-- -<?php -class dooh { - public $blah; -} -$d = new dooh; -var_dump(is_subclass_of($d, 'dooh')); -?> ---EXPECT-- -bool(false) diff --git a/tests/classes/bug24445.phpt b/tests/classes/bug24445.phpt deleted file mode 100644 index af08307ac4..0000000000 --- a/tests/classes/bug24445.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Bug #24445 (get_parent_class() returns the current class when passed an object) ---FILE-- -<?php -class Test { } -var_dump(get_parent_class('Test')); -$t = new Test; -var_dump(get_parent_class($t)); -?> ---EXPECT-- -bool(false) -bool(false) diff --git a/tests/classes/class_abstract.phpt b/tests/classes/class_abstract.phpt deleted file mode 100755 index 880f84930f..0000000000 --- a/tests/classes/class_abstract.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -ZE2 An abstract class cannot be instanciated ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -abstract class base { - function show() { - echo "base\n"; - } -} - -class derived extends base { -} - -$t = new derived(); -$t->show(); - -$t = new base(); -$t->show(); - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -base - -Fatal error: Cannot instantiate abstract class base in %s on line %d diff --git a/tests/classes/class_example.phpt b/tests/classes/class_example.phpt deleted file mode 100644 index 621958b1bd..0000000000 --- a/tests/classes/class_example.phpt +++ /dev/null @@ -1,85 +0,0 @@ ---TEST-- -Classes general test ---FILE-- - -<?php - -/* pretty nifty object oriented code! */ - -class user { - public $first_name,$family_name,$address,$phone_num; - function 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"; - } - function 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/class_final.phpt b/tests/classes/class_final.phpt deleted file mode 100755 index ae310303aa..0000000000 --- a/tests/classes/class_final.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -ZE2 A final class cannot be inherited ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -final class base { - function show() { - echo "base\n"; - } -} - -$t = new base(); -$t->show(); - -class derived extends base { -} - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -base - -Fatal error: Class derived may not inherit from final class (base) in %s on line %d diff --git a/tests/classes/class_stdclass.phpt b/tests/classes/class_stdclass.phpt deleted file mode 100755 index 5e3422aeae..0000000000 --- a/tests/classes/class_stdclass.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -Instantiate stdClass ---FILE-- -<?php - -$obj = new stdClass; - -echo get_class($obj)."\n"; - -echo "Done\n"; -?> ---EXPECTF-- -stdClass -Done diff --git a/tests/classes/clone_001.phpt b/tests/classes/clone_001.phpt deleted file mode 100755 index c116f73973..0000000000 --- a/tests/classes/clone_001.phpt +++ /dev/null @@ -1,43 +0,0 @@ ---TEST-- -ZE2 object cloning, 1 ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class test { - public $p1 = 1; - public $p2 = 2; - public $p3; -}; - -$obj = new test; -$obj->p2 = 'A'; -$obj->p3 = 'B'; -$copy = $obj->__clone(); -$copy->p3 = 'C'; -echo "Object\n"; -var_dump($obj); -echo "Clown\n"; -var_dump($copy); -echo "Done\n"; -?> ---EXPECT-- -Object -object(test)#1 (3) { - ["p1"]=> - int(1) - ["p2"]=> - string(1) "A" - ["p3"]=> - string(1) "B" -} -Clown -object(test)#2 (3) { - ["p1"]=> - int(1) - ["p2"]=> - string(1) "A" - ["p3"]=> - string(1) "C" -} -Done diff --git a/tests/classes/clone_002.phpt b/tests/classes/clone_002.phpt deleted file mode 100755 index 5773b5f273..0000000000 --- a/tests/classes/clone_002.phpt +++ /dev/null @@ -1,45 +0,0 @@ ---TEST-- -ZE2 object cloning, 2 ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class test { - public $p1 = 1; - public $p2 = 2; - public $p3; - public function __clone() { - } -}; - -$obj = new test; -$obj->p2 = 'A'; -$obj->p3 = 'B'; -$copy = $obj->__clone(); -$copy->p3 = 'C'; -echo "Object\n"; -var_dump($obj); -echo "Clown\n"; -var_dump($copy); -echo "Done\n"; -?> ---EXPECT-- -Object -object(test)#1 (3) { - ["p1"]=> - int(1) - ["p2"]=> - string(1) "A" - ["p3"]=> - string(1) "B" -} -Clown -object(test)#2 (3) { - ["p1"]=> - int(1) - ["p2"]=> - int(2) - ["p3"]=> - string(1) "C" -} -Done diff --git a/tests/classes/clone_003.phpt b/tests/classes/clone_003.phpt deleted file mode 100755 index 148204c04d..0000000000 --- a/tests/classes/clone_003.phpt +++ /dev/null @@ -1,58 +0,0 @@ ---TEST-- -ZE2 object cloning, 3 ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class base { - protected $p1 = 'base:1'; - public $p2 = 'base:2'; - public $p3 = 'base:3'; - public $p4 = 'base:4'; - public $p5 = 'base:5'; - private $p6 = 'base:6'; - public function __clone() { - } -}; - -class test extends base { - public $p1 = 'test:1'; - public $p3 = 'test:3'; - public $p4 = 'test:4'; - public $p5 = 'test:5'; - public function __clone() { - $this->p5 = 'clone:5'; - } -} - -$obj = new test; -$obj->p4 = 'A'; -$copy = $obj->__clone(); -echo "Object\n"; -print_r($obj); -echo "Clown\n"; -print_r($copy); -echo "Done\n"; -?> ---EXPECT-- -Object -test Object -( - [p1] => test:1 - [p3] => test:3 - [p4] => A - [p5] => test:5 - [p2] => base:2 - [p6:private] => base:6 -) -Clown -test Object -( - [p1] => test:1 - [p3] => test:3 - [p4] => test:4 - [p5] => clone:5 - [p2] => base:2 - [p6:private] => base:6 -) -Done diff --git a/tests/classes/clone_004.phpt b/tests/classes/clone_004.phpt deleted file mode 100755 index ca1a9fc272..0000000000 --- a/tests/classes/clone_004.phpt +++ /dev/null @@ -1,72 +0,0 @@ ---TEST-- -ZE2 object cloning, 4 ---FILE-- -<?php -abstract class base { - public $a = 'base'; - - // disallow cloning - private function __clone() {} -} - -class test extends base { - public $b = 'test'; - - // reenable cloning - public function __clone() {} - - public function show() { - var_dump($this); - } -} - -echo "Original\n"; -$o1 = new test; -$o1->a = array(1,2); -$o1->b = array(3,4); -$o1->show(); - -echo "Clone\n"; -$o2 = $o1->__clone(); -$o2->show(); - -echo "Modify\n"; -$o2->a = 5; -$o2->b = 6; -$o2->show(); - -echo "Done\n"; -?> ---EXPECT-- -Original -object(test)#1 (2) { - ["b"]=> - array(2) { - [0]=> - int(3) - [1]=> - int(4) - } - ["a"]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} -Clone -object(test)#2 (2) { - ["b"]=> - string(4) "test" - ["a"]=> - string(4) "base" -} -Modify -object(test)#2 (2) { - ["b"]=> - int(6) - ["a"]=> - int(5) -} -Done diff --git a/tests/classes/clone_005.phpt b/tests/classes/clone_005.phpt deleted file mode 100755 index bfe4d66d6f..0000000000 --- a/tests/classes/clone_005.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -ZE2 object cloning, 5 ---FILE-- -<?php -abstract class base { - public $a = 'base'; - - // disallow cloning once forever - final private function __clone() {} -} - -class test extends base { - // reenabling should fail - public function __clone() {} -} - -?> ---EXPECTF-- -Fatal error: Cannot override final method base::__clone() in %sclone_005.php on line %d diff --git a/tests/classes/constants_scope_001.phpt b/tests/classes/constants_scope_001.phpt deleted file mode 100644 index 5dc874872e..0000000000 --- a/tests/classes/constants_scope_001.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -ZE2 class constants and scope ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class ErrorCodes { - const FATAL = "Fatal error\n"; - const WARNING = "Warning\n"; - const INFO = "Informational message\n"; - - static function print_fatal_error_codes() { - echo "FATAL = " . FATAL; - echo "self::FATAL = " . self::FATAL; - } -} - -/* Call the static function and move into the ErrorCodes scope */ -ErrorCodes::print_fatal_error_codes(); - -?> ---EXPECT-- -FATAL = Fatal error -self::FATAL = Fatal error diff --git a/tests/classes/ctor_dtor.phpt b/tests/classes/ctor_dtor.phpt deleted file mode 100644 index fce1c19907..0000000000 --- a/tests/classes/ctor_dtor.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -ZE2 The new constructor/destructor is called ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class early { - function early() { - echo __CLASS__ . "::" . __FUNCTION__ . "\n"; - } - function __construct() { - echo __CLASS__ . "::" . __FUNCTION__ . "\n"; - } - function __destruct() { - echo __CLASS__ . "::" . __FUNCTION__ . "\n"; - } -} - -class late { - function __construct() { - echo __CLASS__ . "::" . __FUNCTION__ . "\n"; - } - function late() { - echo __CLASS__ . "::" . __FUNCTION__ . "\n"; - } - function __destruct() { - echo __CLASS__ . "::" . __FUNCTION__ . "\n"; - } -} - -$t = new early(); -$t->early(); -unset($t); -$t = new late(); -$t->late(); -//unset($t); delay to end of script - -echo "Done\n"; -?> ---EXPECTF-- -early::__construct -early::early -early::__destruct -late::__construct -late::late -Done -late::__destruct diff --git a/tests/classes/ctor_dtor_inheritance.phpt b/tests/classes/ctor_dtor_inheritance.phpt deleted file mode 100644 index 8ae2a5dec4..0000000000 --- a/tests/classes/ctor_dtor_inheritance.phpt +++ /dev/null @@ -1,99 +0,0 @@ ---TEST-- -ZE2 A derived class can use the inherited constructor/destructor ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -// This test checks for: -// - inherited constructors/destructors are not called automatically -// - base classes know about derived properties in constructor/destructor -// - base class constructors/destructors know the instanciated class name - -class base { - public $name; - - function __construct() { - echo __CLASS__ . "::" . __FUNCTION__ . "\n"; - $this->name = 'base'; - print_r($this); - } - - function __destruct() { - echo __CLASS__ . "::" . __FUNCTION__ . "\n"; - print_r($this); - } -} - -class derived extends base { - public $other; - - function __construct() { - $this->name = 'init'; - $this->other = 'other'; - print_r($this); - parent::__construct(); - echo __CLASS__ . "::" . __FUNCTION__ . "\n"; - $this->name = 'derived'; - print_r($this); - } - - function __destruct() { - parent::__destruct(); - echo __CLASS__ . "::" . __FUNCTION__ . "\n"; - print_r($this); - } -} - -echo "Testing class base\n"; -$t = new base(); -unset($t); -echo "Testing class derived\n"; -$t = new derived(); -unset($t); - -echo "Done\n"; -?> ---EXPECTF-- -Testing class base -base::__construct -base Object -( - [name] => base -) -base::__destruct -base Object -( - [name] => base -) -Testing class derived -derived Object -( - [other] => other - [name] => init -) -base::__construct -derived Object -( - [other] => other - [name] => base -) -derived::__construct -derived Object -( - [other] => other - [name] => derived -) -base::__destruct -derived Object -( - [other] => other - [name] => derived -) -derived::__destruct -derived Object -( - [other] => other - [name] => derived -) -Done diff --git a/tests/classes/dereferencing_001.phpt b/tests/classes/dereferencing_001.phpt deleted file mode 100644 index dd2aba78e5..0000000000 --- a/tests/classes/dereferencing_001.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -ZE2 dereferencing of objects from methods ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class Name { - function Name($_name) { - $this->name = $_name; - } - - function display() { - echo $this->name . "\n"; - } -} - -class Person { - private $name; - - function person($_name, $_address) { - $this->name = new Name($_name); - } - - function getName() { - return $this->name; - } -} - -$person = new Person("John", "New York"); -$person->getName()->display(); - -?> ---EXPECT-- -John diff --git a/tests/classes/destructor_and_globals.phpt b/tests/classes/destructor_and_globals.phpt deleted file mode 100755 index 9caf0f1026..0000000000 --- a/tests/classes/destructor_and_globals.phpt +++ /dev/null @@ -1,56 +0,0 @@ ---TEST-- -ZE2 accessing globals from destructor in shutdown ---FILE-- -<?php -$test_cnt = 0; -$test_num = 0; - -function Show() { - global $test_cnt; - echo "Count: $test_cnt\n"; -} - -class counter { - protected $id; - - public function __construct() { - global $test_cnt, $test_num; - $test_cnt++; - $this->id = $test_num++; - } - - public function Show() { - echo 'Id: '.$this->id."\n"; - } - - // try protected here - public function __destruct() { - global $test_cnt; - $test_cnt--; - } - - static public function destroy(&$obj) { - $obj = NULL; - } -} -Show(); -$obj1 = new counter; -$obj1->Show(); -Show(); -$obj2 = new counter; -$obj2->Show(); -Show(); -counter::destroy($obj1); -Show(); -// or uncomment this line and it works -//counter::destroy($obj2); -echo "Done\n"; -?> ---EXPECT-- -Count: 0 -Id: 0 -Count: 1 -Id: 1 -Count: 2 -Count: 1 -Done diff --git a/tests/classes/destructor_and_references.phpt b/tests/classes/destructor_and_references.phpt deleted file mode 100755 index 66e8b41f7d..0000000000 --- a/tests/classes/destructor_and_references.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Destructing and references ---FILE-- -<?php - -class test1 {public $x;}; -class test2 {public $x;}; -class test3 {public $x;}; -class test4 {public $x;}; - -$o1 = new test1; -$o2 = new test2; -$o3 = new test3; -$o4 = new test4; - -$o3->x = &$o4; - -$r1 = &$o1; - -class once {} - -$o = new once; -echo "Done\n"; -?> ---EXPECT-- -Done
\ No newline at end of file diff --git a/tests/classes/destructor_inheritance.phpt b/tests/classes/destructor_inheritance.phpt deleted file mode 100755 index b9a46659b0..0000000000 --- a/tests/classes/destructor_inheritance.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -ZE2 The inherited destructor is called ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class base { - function __construct() { - echo __METHOD__ . "\n"; - } - - function __destruct() { - echo __METHOD__ . "\n"; - } -} - -class derived extends base { -} - -$obj = new derived; - -unset($obj); - -echo 'Done'; -?> ---EXPECT-- -base::__construct -base::__destruct -Done
\ No newline at end of file diff --git a/tests/classes/factory_001.phpt b/tests/classes/factory_001.phpt deleted file mode 100644 index 97b69c1b47..0000000000 --- a/tests/classes/factory_001.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -ZE2 factory objects ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class Circle { - function draw() { - echo "Circle\n"; - } -} - -class Square { - function draw() { - print "Square\n"; - } -} - -function ShapeFactoryMethod($shape) { - switch ($shape) { - case "Circle": - return new Circle(); - case "Square": - return new Square(); - } -} - -ShapeFactoryMethod("Circle")->draw(); -ShapeFactoryMethod("Square")->draw(); - -?> ---EXPECT-- -Circle -Square diff --git a/tests/classes/factory_and_singleton_001.phpt b/tests/classes/factory_and_singleton_001.phpt deleted file mode 100755 index 70fa020a49..0000000000 --- a/tests/classes/factory_and_singleton_001.phpt +++ /dev/null @@ -1,101 +0,0 @@ ---TEST-- -ZE2 factory and singleton, test 1 ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class test { - protected $x; - - static private $test = NULL; - static private $cnt = 0; - - static function factory($x) { - if (test::$test) { - return test::$test; - } else { - test::$test = new test($x); - return test::$test; - } - } - - protected function __construct($x) { - test::$cnt++; - $this->x = $x; - } - - static function destroy() { - test::$test = NULL; - } - - protected function __destruct() { - test::$cnt--; - } - - public function get() { - return $this->x; - } - - static public function getX() { - if (test::$test) { - return test::$test->x; - } else { - return NULL; - } - } - - static public function count() { - return test::$cnt; - } -} - -echo "Access static members\n"; -var_dump(test::getX()); -var_dump(test::count()); - -echo "Create x and y\n"; -$x = test::factory(1); -$y = test::factory(2); -var_dump(test::getX()); -var_dump(test::count()); -var_dump($x->get()); -var_dump($y->get()); - -echo "Destruct x\n"; -$x = NULL; -var_dump(test::getX()); -var_dump(test::count()); -var_dump($y->get()); - -echo "Destruct y\n"; -$y = NULL; -var_dump(test::getX()); -var_dump(test::count()); - -echo "Destruct static\n"; -test::destroy(); -var_dump(test::getX()); -var_dump(test::count()); - -echo "Done\n"; -?> ---EXPECT-- -Access static members -NULL -int(0) -Create x and y -int(1) -int(1) -int(1) -int(1) -Destruct x -int(1) -int(1) -int(1) -Destruct y -int(1) -int(1) -Destruct static -NULL -int(0) -Done diff --git a/tests/classes/factory_and_singleton_002.phpt b/tests/classes/factory_and_singleton_002.phpt deleted file mode 100755 index 3308a561a5..0000000000 --- a/tests/classes/factory_and_singleton_002.phpt +++ /dev/null @@ -1,100 +0,0 @@ ---TEST-- -ZE2 factory and singleton, test 2 ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class test { - protected $x; - - static private $test = NULL; - static private $cnt = 0; - - static function factory($x) { - if (test::$test) { - return test::$test; - } else { - test::$test = new test($x); - return test::$test; - } - } - - protected function __construct($x) { - test::$cnt++; - $this->x = $x; - } - - static function destroy() { - test::$test = NULL; - } - - protected function __destruct() { - test::$cnt--; - } - - public function get() { - return $this->x; - } - - static public function getX() { - if (test::$test) { - return test::$test->x; - } else { - return NULL; - } - } - - static public function count() { - return test::$cnt; - } -} - -echo "Access static members\n"; -var_dump(test::getX()); -var_dump(test::count()); - -echo "Create x and y\n"; -$x = test::factory(1); -$y = test::factory(2); -var_dump(test::getX()); -var_dump(test::count()); -var_dump($x->get()); -var_dump($y->get()); - -echo "Destruct x\n"; -$x = NULL; -var_dump(test::getX()); -var_dump(test::count()); -var_dump($y->get()); - -echo "Destruct y\n"; -$y = NULL; -var_dump(test::getX()); -var_dump(test::count()); - -//echo "Destruct static\n"; -//test::destroy(); -//var_dump(test::getX()); -//var_dump(test::count()); - -echo "Done\n"; -?> ---EXPECT-- -Access static members -NULL -int(0) -Create x and y -int(1) -int(1) -int(1) -int(1) -Destruct x -int(1) -int(1) -int(1) -Destruct y -int(1) -int(1) -Done - -Warning: Call to protected test::__destruct() from context '' during shutdown ignored in Unknown on line 0 diff --git a/tests/classes/factory_and_singleton_003.phpt b/tests/classes/factory_and_singleton_003.phpt deleted file mode 100755 index d81cc4642c..0000000000 --- a/tests/classes/factory_and_singleton_003.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -ZE2 factory and singleton, test 3 ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class test { - - protected function __construct($x) { - } -} - -$obj = new test; - -echo "Done\n"; -?> ---EXPECTF-- -Fatal error: Call to protected test::__construct() from context '' %sfactory_and_singleton_003.php on line %d diff --git a/tests/classes/factory_and_singleton_004.phpt b/tests/classes/factory_and_singleton_004.phpt deleted file mode 100755 index 01c53d85a3..0000000000 --- a/tests/classes/factory_and_singleton_004.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -ZE2 factory and singleton, test 4 ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class test { - - private function __construct($x) { - } -} - -$obj = new test; - -echo "Done\n"; -?> ---EXPECTF-- -Fatal error: Call to private test::__construct() from context '' %sfactory_and_singleton_004.php on line %d diff --git a/tests/classes/factory_and_singleton_005.phpt b/tests/classes/factory_and_singleton_005.phpt deleted file mode 100755 index 2cd7e5cc99..0000000000 --- a/tests/classes/factory_and_singleton_005.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -ZE2 factory and singleton, test 5 ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class test { - - protected function __destruct() { - } -} - -$obj = new test; -$obj = NULL; - -echo "Done\n"; -?> ---EXPECTF-- -Fatal error: Call to protected test::__destruct() from context '' in %sfactory_and_singleton_005.php on line %d diff --git a/tests/classes/factory_and_singleton_006.phpt b/tests/classes/factory_and_singleton_006.phpt deleted file mode 100755 index 81cf714888..0000000000 --- a/tests/classes/factory_and_singleton_006.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -ZE2 factory and singleton, test 6 ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class test { - - private function __destruct() { - } -} - -$obj = new test; -$obj = NULL; - -echo "Done\n"; -?> ---EXPECTF-- -Fatal error: Call to private test::__destruct() from context '' in %sfactory_and_singleton_006.php on line %d - diff --git a/tests/classes/factory_and_singleton_007.phpt b/tests/classes/factory_and_singleton_007.phpt deleted file mode 100755 index 8ca8982fa3..0000000000 --- a/tests/classes/factory_and_singleton_007.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -ZE2 factory and singleton, test 7 ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class test { - - protected function __clone() { - } -} - -$obj = new test; -$clone = $obj->__clone(); -$obj = NULL; - -echo "Done\n"; -?> ---EXPECTF-- -Fatal error: Call to protected test::__clone() from context '' %sfactory_and_singleton_007.php on line %d diff --git a/tests/classes/factory_and_singleton_008.phpt b/tests/classes/factory_and_singleton_008.phpt deleted file mode 100755 index b3fbf29f2e..0000000000 --- a/tests/classes/factory_and_singleton_008.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -ZE2 factory and singleton, test 8 ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class test { - - private function __clone() { - } -} - -$obj = new test; -$clone = $obj->__clone(); -$obj = NULL; - -echo "Done\n"; -?> ---EXPECTF-- -Fatal error: Call to private test::__clone() from context '' %sfactory_and_singleton_008.php on line %d diff --git a/tests/classes/factory_and_singleton_009.phpt b/tests/classes/factory_and_singleton_009.phpt deleted file mode 100755 index acf792c316..0000000000 --- a/tests/classes/factory_and_singleton_009.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -ZE2 factory and singleton, test 9 ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class test { - - protected function __destruct() { - echo __METHOD__ . "\n"; - } -} - -$obj = new test; - -?> -===DONE=== ---EXPECTF-- -===DONE=== - -Warning: Call to protected test::__destruct() from context '' during shutdown ignored in Unknown on line 0 diff --git a/tests/classes/factory_and_singleton_010.phpt b/tests/classes/factory_and_singleton_010.phpt deleted file mode 100755 index 0f5fb2dc74..0000000000 --- a/tests/classes/factory_and_singleton_010.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -ZE2 factory and singleton, test 10 ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class test { - - private function __destruct() { - echo __METHOD__ . "\n"; - } -} - -$obj = new test; - -?> -===DONE=== ---EXPECTF-- -===DONE=== - -Warning: Call to private test::__destruct() from context '' during shutdown ignored in Unknown on line 0 diff --git a/tests/classes/final.phpt b/tests/classes/final.phpt deleted file mode 100644 index b4e37a36f6..0000000000 --- a/tests/classes/final.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -ZE2 A method may be redeclared final ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class first { - function show() { - echo "Call to function first::show()\n"; - } -} - -$t = new first(); -$t->show(); - -class second extends first { - final function show() { - echo "Call to function second::show()\n"; - } -} - -$t2 = new second(); -$t2->show(); - -echo "Done\n"; -?> ---EXPECTF-- -Call to function first::show() -Call to function second::show() -Done
\ No newline at end of file diff --git a/tests/classes/final_abstract.phpt b/tests/classes/final_abstract.phpt deleted file mode 100644 index 426c852cfc..0000000000 --- a/tests/classes/final_abstract.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -ZE2 A final method cannot be abstract ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class fail { - final abstract function show(); -} - -echo "Done\n"; // Shouldn't be displayed -?> ---EXPECTF-- - -Fatal error: Cannot use the final modifier on an abstract class member in %s diff --git a/tests/classes/final_redeclare.phpt b/tests/classes/final_redeclare.phpt deleted file mode 100644 index cc614c4e06..0000000000 --- a/tests/classes/final_redeclare.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -ZE2 A final method may not be overwritten ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - final function show() { - echo "Call to function pass::show()\n"; - } -} - -$t = new pass(); -$t->show(); - -class fail extends pass { - function show() { - echo "Call to function fail::show()\n"; - } -} - -echo "Done\n"; // Shouldn't be displayed -?> ---EXPECTF-- -Call to function pass::show() - -Fatal error: Cannot override final method pass::show() in %s on line %d diff --git a/tests/classes/incdec_property_001.phpt b/tests/classes/incdec_property_001.phpt deleted file mode 100644 index 39bf06f65f..0000000000 --- a/tests/classes/incdec_property_001.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -ZE2 post increment/decrement property of overloaded object ---FILE-- -<?php - -class Test { - private $real_a = 2; - - function __set($property, $value) { - if ($property = "a") { - $this->real_a = $value; - } - } - - function __get($property) { - if ($property = "a") { - return $this->real_a; - } - } -} - -$obj = new Test; -var_dump($obj->a); -$obj->a++; -var_dump($obj->a); -echo "---Done---\n"; -?> ---EXPECT-- -int(2) -int(3) ----Done--- diff --git a/tests/classes/incdec_property_002.phpt b/tests/classes/incdec_property_002.phpt deleted file mode 100644 index fe08625ea8..0000000000 --- a/tests/classes/incdec_property_002.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -ZE2 post increment/decrement property of overloaded object with assignment ---FILE-- -<?php - -class Test { - private $real_a = 2; - - function __set($property, $value) { - if ($property = "a") { - $this->real_a = $value; - } - } - - function __get($property) { - if ($property = "a") { - return $this->real_a; - } - } -} - -$obj = new Test; -var_dump($obj->a); -$t1 = $obj->a++; -var_dump($obj->a); -echo "---Done---\n"; -?> ---EXPECT-- -int(2) -int(3) ----Done--- diff --git a/tests/classes/incdec_property_003.phpt b/tests/classes/incdec_property_003.phpt deleted file mode 100644 index d26277ab8d..0000000000 --- a/tests/classes/incdec_property_003.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -ZE2 pre increment/decrement property of overloaded object ---FILE-- -<?php - -class Test { - private $real_a = 2; - - function __set($property, $value) { - if ($property = "a") { - $this->real_a = $value; - } - } - - function __get($property) { - if ($property = "a") { - return $this->real_a; - } - } -} - -$obj = new Test; -var_dump($obj->a); -++$obj->a; -var_dump($obj->a); -echo "---Done---\n"; -?> ---EXPECT-- -int(2) -int(3) ----Done--- diff --git a/tests/classes/incdec_property_004.phpt b/tests/classes/incdec_property_004.phpt deleted file mode 100644 index 5ccad190b8..0000000000 --- a/tests/classes/incdec_property_004.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -ZE2 pre increment/decrement property of overloaded object with assignment ---FILE-- -<?php - -class Test { - private $real_a = 2; - - function __set($property, $value) { - if ($property = "a") { - $this->real_a = $value; - } - } - - function __get($property) { - if ($property = "a") { - return $this->real_a; - } - } -} - -$obj = new Test; -var_dump($obj->a); -$t1 = ++$obj->a; -var_dump($obj->a); -echo "---Done---\n"; -?> ---EXPECT-- -int(2) -int(3) ----Done--- diff --git a/tests/classes/inheritance.phpt b/tests/classes/inheritance.phpt deleted file mode 100644 index 070ad9147d..0000000000 --- a/tests/classes/inheritance.phpt +++ /dev/null @@ -1,56 +0,0 @@ ---TEST-- -Classes inheritance test ---FILE-- -<?php - -/* Inheritance test. Pretty nifty if I do say so myself! */ - -class foo { - public $a; - public $b; - function display() { - echo "This is class foo\n"; - echo "a = ".$this->a."\n"; - echo "b = ".$this->b."\n"; - } - function mul() { - return $this->a*$this->b; - } -}; - -class bar extends foo { - public $c; - function 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/classes/inheritance_002.phpt b/tests/classes/inheritance_002.phpt deleted file mode 100755 index a5688bba56..0000000000 --- a/tests/classes/inheritance_002.phpt +++ /dev/null @@ -1,79 +0,0 @@ ---TEST-- -ZE2 Constructor precedence ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class Base_php4 { - function Base_php4() { - var_dump('Base constructor'); - } -} - -class Child_php4 extends Base_php4 { - function Child_php4() { - var_dump('Child constructor'); - parent::Base_php4(); - } -} - -class Base_php5 { - function __construct() { - var_dump('Base constructor'); - } - - function Base_php5() { - var_dump('I should not be called'); - } -} - -class Child_php5 extends Base_php5 { - function __construct() { - var_dump('Child constructor'); - parent::__construct(); - } - - function Child_php5() { - var_dump('I should not be called'); - } -} - -class Child_mx1 extends Base_php4 { - function __construct() { - var_dump('Child constructor'); - parent::Base_php4(); - } -} - -class Child_mx2 extends Base_php5 { - function Child_mx2() { - var_dump('Child constructor'); - parent::__construct(); - } -} - -echo "### PHP 4 style\n"; -$c4= new Child_php4(); - -echo "### PHP 5 style\n"; -$c5= new Child_php5(); - -echo "### Mixed style 1\n"; -$cm= new Child_mx1(); - -echo "### Mixed style 2\n"; -$cm= new Child_mx2(); -?> ---EXPECT-- -### PHP 4 style -string(17) "Child constructor" -string(16) "Base constructor" -### PHP 5 style -string(17) "Child constructor" -string(16) "Base constructor" -### Mixed style 1 -string(17) "Child constructor" -string(16) "Base constructor" -### Mixed style 2 -string(17) "Child constructor" -string(16) "Base constructor" diff --git a/tests/classes/interface_class.phpt b/tests/classes/interface_class.phpt deleted file mode 100644 index 22520de1f9..0000000000 --- a/tests/classes/interface_class.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -ZE2 A class can only implement interfaces ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class base { -} - -class derived implements base { -} -?> ---EXPECTF-- -Fatal error: derived cannot implement base - it is not an interface in %s on line %d diff --git a/tests/classes/interface_doubled.phpt b/tests/classes/interface_doubled.phpt deleted file mode 100644 index 4c41ce1172..0000000000 --- a/tests/classes/interface_doubled.phpt +++ /dev/null @@ -1,199 +0,0 @@ ---TEST-- -ZE2 An interface may both inherit and implement base interfaces ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -interface if_a { - abstract function f_a(); -} - -interface if_b { - abstract function f_b(); -} - -interface if_c extends if_a, if_b { - abstract function f_c(); -} - -interface if_d extends if_a, if_b { - abstract function f_d(); -} - -interface if_e { - abstract function f_d(); -} - -interface if_f extends if_e, if_a, if_b, if_c, if_d, if_e { -} - -class base { - function test($class) { - echo "is_a(" . get_class($this) . ", $class) ". (($this instanceof $class) ? "yes\n" : "no\n"); - } -} - -echo "class_a\n"; - -class class_a extends base implements if_a { - function f_a() {} - function f_b() {} - function f_c() {} - function f_d() {} - function f_e() {} -} - -$t = new class_a(); -echo $t->test('if_a'); -echo $t->test('if_b'); -echo $t->test('if_c'); -echo $t->test('if_d'); -echo $t->test('if_e'); - -echo "class_b\n"; - -class class_b extends base implements if_a, if_b { - function f_a() {} - function f_b() {} - function f_c() {} - function f_d() {} - function f_e() {} -} - -$t = new class_b(); -echo $t->test('if_a'); -echo $t->test('if_b'); -echo $t->test('if_c'); -echo $t->test('if_d'); -echo $t->test('if_e'); - -echo "class_c\n"; - -class class_c extends base implements if_c { - function f_a() {} - function f_b() {} - function f_c() {} - function f_d() {} - function f_e() {} -} - -$t = new class_c(); -echo $t->test('if_a'); -echo $t->test('if_b'); -echo $t->test('if_c'); -echo $t->test('if_d'); -echo $t->test('if_e'); - -echo "class_d\n"; - -class class_d extends base implements if_d{ - function f_a() {} - function f_b() {} - function f_c() {} - function f_d() {} - function f_e() {} -} - -$t = new class_d(); -echo $t->test('if_a'); -echo $t->test('if_b'); -echo $t->test('if_c'); -echo $t->test('if_d'); -echo $t->test('if_e'); - -echo "class_e\n"; - -class class_e extends base implements if_a, if_b, if_c, if_d { - function f_a() {} - function f_b() {} - function f_c() {} - function f_d() {} - function f_e() {} -} - -$t = new class_e(); -echo $t->test('if_a'); -echo $t->test('if_b'); -echo $t->test('if_c'); -echo $t->test('if_d'); -echo $t->test('if_e'); - -echo "class_f\n"; - -class class_f extends base implements if_e { - function f_a() {} - function f_b() {} - function f_c() {} - function f_d() {} - function f_e() {} -} - -$t = new class_f(); -echo $t->test('if_a'); -echo $t->test('if_b'); -echo $t->test('if_c'); -echo $t->test('if_d'); -echo $t->test('if_e'); - -echo "class_g\n"; - -class class_g extends base implements if_f { - function f_a() {} - function f_b() {} - function f_c() {} - function f_d() {} - function f_e() {} -} - -$t = new class_g(); -echo $t->test('if_a'); -echo $t->test('if_b'); -echo $t->test('if_c'); -echo $t->test('if_d'); -echo $t->test('if_e'); - -?> ---EXPECTF-- -class_a -is_a(class_a, if_a) yes -is_a(class_a, if_b) no -is_a(class_a, if_c) no -is_a(class_a, if_d) no -is_a(class_a, if_e) no -class_b -is_a(class_b, if_a) yes -is_a(class_b, if_b) yes -is_a(class_b, if_c) no -is_a(class_b, if_d) no -is_a(class_b, if_e) no -class_c -is_a(class_c, if_a) yes -is_a(class_c, if_b) yes -is_a(class_c, if_c) yes -is_a(class_c, if_d) no -is_a(class_c, if_e) no -class_d -is_a(class_d, if_a) yes -is_a(class_d, if_b) yes -is_a(class_d, if_c) no -is_a(class_d, if_d) yes -is_a(class_d, if_e) no -class_e -is_a(class_e, if_a) yes -is_a(class_e, if_b) yes -is_a(class_e, if_c) yes -is_a(class_e, if_d) yes -is_a(class_e, if_e) no -class_f -is_a(class_f, if_a) no -is_a(class_f, if_b) no -is_a(class_f, if_c) no -is_a(class_f, if_d) no -is_a(class_f, if_e) yes -class_g -is_a(class_g, if_a) yes -is_a(class_g, if_b) yes -is_a(class_g, if_c) yes -is_a(class_g, if_d) yes -is_a(class_g, if_e) yes
\ No newline at end of file diff --git a/tests/classes/interface_implemented.phpt b/tests/classes/interface_implemented.phpt deleted file mode 100644 index 0f5e5cbe7b..0000000000 --- a/tests/classes/interface_implemented.phpt +++ /dev/null @@ -1,103 +0,0 @@ ---TEST-- -ZE2 An interface is inherited ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -interface if_a { - abstract function f_a(); -} - -interface if_b extends if_a { - abstract function f_b(); -} - -class base { - function _is_a($sub) { - echo 'is_a('.get_class($this).', '.$sub.') = '.(($this instanceof $sub) ? 'yes' : 'no')."\n"; - } - function test() { - echo $this->_is_a('base'); - echo $this->_is_a('derived_a'); - echo $this->_is_a('derived_b'); - echo $this->_is_a('derived_c'); - echo $this->_is_a('derived_d'); - echo $this->_is_a('if_a'); - echo $this->_is_a('if_b'); - echo "\n"; - } -} - -class derived_a extends base implements if_a { - function f_a() {} -} - -class derived_b extends base implements if_a, if_b { - function f_a() {} - function f_b() {} -} - -class derived_c extends derived_a implements if_b { - function f_b() {} -} - -class derived_d extends derived_c { -} - -$t = new base(); -$t->test(); - -$t = new derived_a(); -$t->test(); - -$t = new derived_b(); -$t->test(); - -$t = new derived_c(); -$t->test(); - -$t = new derived_d(); -$t->test(); - -?> ---EXPECTF-- -is_a(base, base) = yes -is_a(base, derived_a) = no -is_a(base, derived_b) = no -is_a(base, derived_c) = no -is_a(base, derived_d) = no -is_a(base, if_a) = no -is_a(base, if_b) = no - -is_a(derived_a, base) = yes -is_a(derived_a, derived_a) = yes -is_a(derived_a, derived_b) = no -is_a(derived_a, derived_c) = no -is_a(derived_a, derived_d) = no -is_a(derived_a, if_a) = yes -is_a(derived_a, if_b) = no - -is_a(derived_b, base) = yes -is_a(derived_b, derived_a) = no -is_a(derived_b, derived_b) = yes -is_a(derived_b, derived_c) = no -is_a(derived_b, derived_d) = no -is_a(derived_b, if_a) = yes -is_a(derived_b, if_b) = yes - -is_a(derived_c, base) = yes -is_a(derived_c, derived_a) = yes -is_a(derived_c, derived_b) = no -is_a(derived_c, derived_c) = yes -is_a(derived_c, derived_d) = no -is_a(derived_c, if_a) = yes -is_a(derived_c, if_b) = yes - -is_a(derived_d, base) = yes -is_a(derived_d, derived_a) = yes -is_a(derived_d, derived_b) = no -is_a(derived_d, derived_c) = yes -is_a(derived_d, derived_d) = yes -is_a(derived_d, if_a) = yes -is_a(derived_d, if_b) = yes diff --git a/tests/classes/interface_instantiate.phpt b/tests/classes/interface_instantiate.phpt deleted file mode 100644 index d13bb9a6a0..0000000000 --- a/tests/classes/interface_instantiate.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -ZE2 An interface cannot be instantiated ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -interface if_a { - abstract function f_a(); -} - -$t = new if_a(); - -?> ---EXPECTF-- -Fatal error: Cannot instantiate interface if_a in %s on line %d diff --git a/tests/classes/interface_member.phpt b/tests/classes/interface_member.phpt deleted file mode 100644 index 329c0728b5..0000000000 --- a/tests/classes/interface_member.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -ZE2 An interface cannot have properties ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -interface if_a { - public $member; -} -?> ---EXPECTF-- -Fatal error: Interfaces may not include member variables in %s on line %d diff --git a/tests/classes/interface_method.phpt b/tests/classes/interface_method.phpt deleted file mode 100644 index 3570b35928..0000000000 --- a/tests/classes/interface_method.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -ZE2 An interface method must be abstract ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -interface if_a { - function err() {}; -} - -?> ---EXPECTF-- - -Fatal error: Interface function if_a::err() cannot contain body %s on line %d diff --git a/tests/classes/interface_method_final.phpt b/tests/classes/interface_method_final.phpt deleted file mode 100644 index 01e599c5b9..0000000000 --- a/tests/classes/interface_method_final.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -ZE2 An interface method cannot be final ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class if_a { - abstract final function err(); -} - -?> ---EXPECTF-- - -Fatal error: Cannot use the final modifier on an abstract class member in %s on line %d diff --git a/tests/classes/interface_method_private.phpt b/tests/classes/interface_method_private.phpt deleted file mode 100644 index f0f671b524..0000000000 --- a/tests/classes/interface_method_private.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -ZE2 An interface method cannot be private ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -interface if_a { - abstract private function err(); -} - -?> ---EXPECTF-- - -Fatal error: Access type for interface method if_a::err() must be omitted or declared public in %s on line %d diff --git a/tests/classes/interface_must_be_implemented.phpt b/tests/classes/interface_must_be_implemented.phpt deleted file mode 100644 index 82ddf24df8..0000000000 --- a/tests/classes/interface_must_be_implemented.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -ZE2 An interface must be implemented ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -interface if_a { - abstract function f_a(); -} - -class derived_a implements if_a { -} - -?> ---EXPECTF-- -Fatal error: Class derived_a contains 1 abstract methods and must therefore be declared abstract (if_a::f_a) in %s on line %d diff --git a/tests/classes/interfaces_001.phpt b/tests/classes/interfaces_001.phpt deleted file mode 100644 index 41e1f6776d..0000000000 --- a/tests/classes/interfaces_001.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -ZE2 interfaces ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -interface Throwable { - public function getMessage(); -} - -class Exception_foo implements Throwable { - public $foo = "foo"; - - public function getMessage() { - return $this->foo; - } -} - -$foo = new Exception_foo; -echo $foo->getMessage() . "\n"; - -?> ---EXPECT-- -foo - diff --git a/tests/classes/interfaces_002.phpt b/tests/classes/interfaces_002.phpt deleted file mode 100644 index 66d46f5d36..0000000000 --- a/tests/classes/interfaces_002.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -ZE2 interface with an unimplemented method ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -interface Throwable { - public function getMessage(); - public function getErrno(); -} - -class Exception_foo implements Throwable { - public $foo = "foo"; - - public function getMessage() { - return $this->foo; - } -} - -// this should die -- Exception class must be abstract... -$foo = new Exception_foo; -echo $foo->getMessage() . "\n"; - -?> ---EXPECTF-- - -Fatal error: Class Exception_foo contains 1 abstract methods and must therefore be declared abstract (Throwable::getErrno) in %s on line %d - diff --git a/tests/classes/iterators_001.phpt b/tests/classes/iterators_001.phpt deleted file mode 100755 index a759b947bb..0000000000 --- a/tests/classes/iterators_001.phpt +++ /dev/null @@ -1,216 +0,0 @@ ---TEST-- -ZE2 iterators and foreach ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> -<?php if (!class_exists('Iterator')) print "skip interface iterator doesn't exist"; ?> ---FILE-- -<?php -class c_iter implements Iterator { - - private $obj; - private $num = 0; - - function __construct($obj) { - echo __METHOD__ . "\n"; - $this->num = 0; - $this->obj = $obj; - } - function rewind() { - } - function hasMore() { - $more = $this->num < $this->obj->max; - echo __METHOD__ . ' = ' .($more ? 'true' : 'false') . "\n"; - return $more; - } - function current() { - echo __METHOD__ . "\n"; - return $this->num; - } - function next() { - echo __METHOD__ . "\n"; - $this->num++; - } - function key() { - echo __METHOD__ . "\n"; - switch($this->num) { - case 0: return "1st"; - case 1: return "2nd"; - case 2: return "3rd"; - default: return "???"; - } - } -} - -class c implements IteratorAggregate { - - public $max = 3; - - function getIterator() { - echo __METHOD__ . "\n"; - return new c_iter($this); - } -} - -echo "===Array===\n"; - -$a = array(0,1,2); -foreach($a as $v) { - echo "array:$v\n"; -} - -echo "===Manual===\n"; -$t = new c(); -for ($iter = $t->getIterator(); $iter->hasMore(); $iter->next()) { - echo $iter->current() . "\n"; -} - -echo "===foreach/std===\n"; -foreach($t as $v) { - echo "object:$v\n"; -} - -echo "===foreach/rec===\n"; -foreach($t as $v) { - foreach($t as $w) { - echo "double:$v:$w\n"; - } -} - -echo "===foreach/key===\n"; -foreach($t as $i => $v) { - echo "object:$i=>$v\n"; -} - -print "Done\n"; -exit(0); -?> ---EXPECT-- -===Array=== -array:0 -array:1 -array:2 -===Manual=== -c::getIterator -c_iter::__construct -c_iter::hasMore = true -c_iter::current -0 -c_iter::next -c_iter::hasMore = true -c_iter::current -1 -c_iter::next -c_iter::hasMore = true -c_iter::current -2 -c_iter::next -c_iter::hasMore = false -===foreach/std=== -c::getIterator -c_iter::__construct -c_iter::hasMore = true -c_iter::current -c_iter::key -object:0 -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -object:1 -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -object:2 -c_iter::next -c_iter::hasMore = false -===foreach/rec=== -c::getIterator -c_iter::__construct -c_iter::hasMore = true -c_iter::current -c_iter::key -c::getIterator -c_iter::__construct -c_iter::hasMore = true -c_iter::current -c_iter::key -double:0:0 -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -double:0:1 -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -double:0:2 -c_iter::next -c_iter::hasMore = false -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -c::getIterator -c_iter::__construct -c_iter::hasMore = true -c_iter::current -c_iter::key -double:1:0 -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -double:1:1 -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -double:1:2 -c_iter::next -c_iter::hasMore = false -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -c::getIterator -c_iter::__construct -c_iter::hasMore = true -c_iter::current -c_iter::key -double:2:0 -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -double:2:1 -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -double:2:2 -c_iter::next -c_iter::hasMore = false -c_iter::next -c_iter::hasMore = false -===foreach/key=== -c::getIterator -c_iter::__construct -c_iter::hasMore = true -c_iter::current -c_iter::key -object:1st=>0 -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -object:2nd=>1 -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -object:3rd=>2 -c_iter::next -c_iter::hasMore = false -Done diff --git a/tests/classes/iterators_002.phpt b/tests/classes/iterators_002.phpt deleted file mode 100755 index 537b2138bf..0000000000 --- a/tests/classes/iterators_002.phpt +++ /dev/null @@ -1,117 +0,0 @@ ---TEST-- -ZE2 iterators and break ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> -<?php if (!class_exists('Iterator')) print "skip interface iterator doesn't exist"; ?> ---FILE-- -<?php -class c_iter implements Iterator { - - private $obj; - private $num = 0; - - function __construct($obj) { - echo __METHOD__ . "\n"; - $this->obj = $obj; - } - function rewind() { - echo __METHOD__ . "\n"; - $this->num = 0; - } - function hasMore() { - $more = $this->num < $this->obj->max; - echo __METHOD__ . ' = ' .($more ? 'true' : 'false') . "\n"; - return $more; - } - function current() { - echo __METHOD__ . "\n"; - return $this->num; - } - function next() { - echo __METHOD__ . "\n"; - $this->num++; - } - function key() { - echo __METHOD__ . "\n"; - switch($this->num) { - case 0: return "1st"; - case 1: return "2nd"; - case 2: return "3rd"; - default: return "???"; - } - } - function __destruct() { - echo __METHOD__ . "\n"; - } -} - -class c implements IteratorAggregate { - - public $max = 3; - - function getIterator() { - echo __METHOD__ . "\n"; - return new c_iter($this); - } - function __destruct() { - echo __METHOD__ . "\n"; - } -} - -$t = new c(); - -foreach($t as $v) { - foreach($t as $w) { - echo "double:$v:$w\n"; - break; - } -} - -unset($t); - -print "Done\n"; -?> ---EXPECT-- -c::getIterator -c_iter::__construct -c_iter::rewind -c_iter::hasMore = true -c_iter::current -c_iter::key -c::getIterator -c_iter::__construct -c_iter::rewind -c_iter::hasMore = true -c_iter::current -c_iter::key -double:0:0 -c_iter::__destruct -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -c::getIterator -c_iter::__construct -c_iter::rewind -c_iter::hasMore = true -c_iter::current -c_iter::key -double:1:0 -c_iter::__destruct -c_iter::next -c_iter::hasMore = true -c_iter::current -c_iter::key -c::getIterator -c_iter::__construct -c_iter::rewind -c_iter::hasMore = true -c_iter::current -c_iter::key -double:2:0 -c_iter::__destruct -c_iter::next -c_iter::hasMore = false -c_iter::__destruct -c::__destruct -Done diff --git a/tests/classes/iterators_003.phpt b/tests/classes/iterators_003.phpt deleted file mode 100755 index dd27753ad0..0000000000 --- a/tests/classes/iterators_003.phpt +++ /dev/null @@ -1,116 +0,0 @@ ---TEST-- -ZE2 iterators and break ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> -<?php if (!class_exists('Iterator')) print "skip interface iterator doesn't exist"; ?> ---FILE-- -<?php -class c_iter implements Iterator { - - private $obj; - private $num = 0; - - function __construct($obj) { - echo __METHOD__ . "\n"; - $this->obj = $obj; - } - function rewind() { - echo __METHOD__ . "\n"; - } - function hasMore() { - $more = $this->num < $this->obj->max; - echo __METHOD__ . ' = ' .($more ? 'true' : 'false') . "\n"; - return $more; - } - function current() { - echo __METHOD__ . "\n"; - return $this->num; - } - function next() { - echo __METHOD__ . "\n"; - $this->num++; - } - function key() { - return $this->num; - } -} - -class c implements IteratorAggregate { - - public $max = 4; - - function getIterator() { - echo __METHOD__ . "\n"; - return new c_iter($this); - } -} - -$t = new c(); - -foreach($t as $v) { - if ($v == 0) { - echo "continue outer\n"; - continue; - } - foreach($t as $w) { - if ($w == 1) { - echo "continue inner\n"; - continue; - } - if ($w == 2) { - echo "break inner\n"; - break; - } - echo "double:$v:$w\n"; - } - if ($v == 2) { - echo "break outer\n"; - break; - } -} - -print "Done\n"; -?> ---EXPECT-- -c::getIterator -c_iter::__construct -c_iter::rewind -c_iter::hasMore = true -c_iter::current -continue outer -c_iter::next -c_iter::hasMore = true -c_iter::current -c::getIterator -c_iter::__construct -c_iter::rewind -c_iter::hasMore = true -c_iter::current -double:1:0 -c_iter::next -c_iter::hasMore = true -c_iter::current -continue inner -c_iter::next -c_iter::hasMore = true -c_iter::current -break inner -c_iter::next -c_iter::hasMore = true -c_iter::current -c::getIterator -c_iter::__construct -c_iter::rewind -c_iter::hasMore = true -c_iter::current -double:2:0 -c_iter::next -c_iter::hasMore = true -c_iter::current -continue inner -c_iter::next -c_iter::hasMore = true -c_iter::current -break inner -break outer -Done diff --git a/tests/classes/iterators_004.phpt b/tests/classes/iterators_004.phpt deleted file mode 100755 index b67a1634e9..0000000000 --- a/tests/classes/iterators_004.phpt +++ /dev/null @@ -1,62 +0,0 @@ ---TEST-- -ZE2 iterators must be implemented ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> -<?php if (!class_exists('iterator')) print "skip interface iterator doesn't exist"; ?> ---FILE-- -<?php - -echo "1st try\n"; - -class c1 {} - -$obj = new c1(); - -foreach($obj as $w) { - echo "object:$w\n"; -} - -echo "2nd try\n"; - -class c2 { - - public $max = 3; - public $num = 0; - - function current() { - echo __METHOD__ . "\n"; - return $this->num; - } - function next() { - echo __METHOD__ . "\n"; - $this->num++; - } - function hasMore() { - echo __METHOD__ . "\n"; - return $this->num < $this->max; - } - function key() { - echo __METHOD__ . "\n"; - switch($this->num) { - case 0: return "1st"; - case 1: return "2nd"; - case 2: return "3rd"; - default: return "???"; - } - } -} - -$obj = new c2(); - -foreach($obj as $v => $w) { - echo "object:$v=>$w\n"; -} - -print "Done\n"; -?> ---EXPECTF-- -1st try -2nd try -object:max=>3 -object:num=>0 -Done diff --git a/tests/classes/iterators_005.phpt b/tests/classes/iterators_005.phpt deleted file mode 100755 index 6c1dadcc1a..0000000000 --- a/tests/classes/iterators_005.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -ZE2 iterators cannot implement Traversable alone ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> -<?php if (!class_exists('iterator')) print "skip interface iterator doesn't exist"; ?> ---FILE-- -<?php - -class test implements Traversable { -} - -$obj = new test; - -foreach($obj as $v); - -print "Done\n"; -/* the error doesn't show the filename but 'Unknown' */ -?> ---EXPECTF-- -Fatal error: Class test must implement interface Traversable as part of either Iterator or IteratorAggregate in %s on line %d diff --git a/tests/classes/iterators_006.phpt b/tests/classes/iterators_006.phpt deleted file mode 100644 index 5f85224b12..0000000000 --- a/tests/classes/iterators_006.phpt +++ /dev/null @@ -1,87 +0,0 @@ ---TEST-- -ZE2 iterators and array wrapping ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 is needed'); ?> ---FILE-- -<?php - -class ai implements Iterator { - - private $array; - - function __construct() { - $this->array = array('foo', 'bar', 'baz'); - } - - function rewind() { - reset($this->array); - $this->next(); - } - - function hasMore() { - return $this->key !== NULL; - } - - function key() { - return $this->key; - } - - function current() { - return $this->current; - } - - function next() { - list($this->key, $this->current) = each($this->array); -// list($key, $current) = each($this->array); -// $this->key = $key; -// $this->current = $current; - } -} - -class a implements IteratorAggregate { - - public function getIterator() { - return new ai(); - } -} - -$array = new a(); - -foreach ($array as $property => $value) { - print "$property: $value\n"; -} - -#$array = $array->getIterator(); -#$array->rewind(); -#$array->hasMore(); -#var_dump($array->key()); -#var_dump($array->current()); -echo "===2nd===\n"; - -$array = new ai(); - -foreach ($array as $property => $value) { - print "$property: $value\n"; -} - -echo "===3rd===\n"; - -foreach ($array as $property => $value) { - print "$property: $value\n"; -} - -?> -===DONE=== ---EXPECT-- -0: foo -1: bar -2: baz -===2nd=== -0: foo -1: bar -2: baz -===3rd=== -0: foo -1: bar -2: baz -===DONE===
\ No newline at end of file diff --git a/tests/classes/object_reference_001.phpt b/tests/classes/object_reference_001.phpt deleted file mode 100644 index 74acb5de13..0000000000 --- a/tests/classes/object_reference_001.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -ZE2 object references ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class Foo { - public $name; - - function Foo() { - $this->name = "I'm Foo!\n"; - } -} - -$foo = new Foo; -echo $foo->name; -$bar = $foo; -$bar->name = "I'm Bar!\n"; - -// In ZE1, we would expect "I'm Foo!" -echo $foo->name; - -?> ---EXPECT-- -I'm Foo! -I'm Bar! diff --git a/tests/classes/private_001.phpt b/tests/classes/private_001.phpt deleted file mode 100644 index 310b9c6434..0000000000 --- a/tests/classes/private_001.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -ZE2 A private method can only be called inside the class ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - private static function show() { - echo "Call show()\n"; - } - - public static function do_show() { - pass::show(); - } -} - -pass::do_show(); -pass::show(); - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call show() - -Fatal error: Call to private method pass::show() from context '' in %s on line %d diff --git a/tests/classes/private_002.phpt b/tests/classes/private_002.phpt deleted file mode 100644 index 258fd3a17d..0000000000 --- a/tests/classes/private_002.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -ZE2 A private method cannot be called in another class ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - private static function show() { - echo "Call pass::show()\n"; - } - - public static function do_show() { - pass::show(); - } -} - -pass::do_show(); - -class fail { - public static function show() { - echo "Call fail::show()\n"; - pass::show(); - } -} - -fail::show(); - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call pass::show() -Call fail::show() - -Fatal error: Call to private method pass::show() from context 'fail' in %s on line %d diff --git a/tests/classes/private_003.phpt b/tests/classes/private_003.phpt deleted file mode 100644 index 716efbc8c7..0000000000 --- a/tests/classes/private_003.phpt +++ /dev/null @@ -1,36 +0,0 @@ ---TEST-- -ZE2 A private method cannot be called in a derived class ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -ini_set("error_reporting",2039); -class pass { - private static function show() { - echo "Call show()\n"; - } - - protected static function good() { - pass::show(); - } -} - -class fail extends pass { - static function ok() { - pass::good(); - } - - static function not_ok() { - pass::show(); - } -} - -fail::ok(); -fail::not_ok(); // calling a private function - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call show() - -Fatal error: Call to private method pass::show() from context 'fail' in %s on line %d diff --git a/tests/classes/private_003b.phpt b/tests/classes/private_003b.phpt deleted file mode 100644 index 780b2e6b4c..0000000000 --- a/tests/classes/private_003b.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -ZE2 A private method cannot be called in a derived class ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - private function show() { - echo "Call show()\n"; - } - - protected function good() { - $this->show(); - } -} - -class fail extends pass { - public function ok() { - $this->good(); - } - - public function not_ok() { - $this->show(); - } -} - -$t = new fail(); -$t->ok(); -$t->not_ok(); // calling a private function - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call show() - -Fatal error: Call to private method pass::show() from context 'fail' in %s on line %d diff --git a/tests/classes/private_004.phpt b/tests/classes/private_004.phpt deleted file mode 100644 index 027434ab87..0000000000 --- a/tests/classes/private_004.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -ZE2 A private method cannot be called in a derived class ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - private static function show() { - echo "Call show()\n"; - } - - public static function do_show() { - pass::show(); - } -} - -class fail extends pass { - static function do_show() { - fail::show(); - } -} - -pass::do_show(); -fail::do_show(); - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call show() - -Fatal error: Call to private method pass::show() from context 'fail' in %s on line %d diff --git a/tests/classes/private_004b.phpt b/tests/classes/private_004b.phpt deleted file mode 100644 index ea3fe610d3..0000000000 --- a/tests/classes/private_004b.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -ZE2 A private method cannot be called in a derived class ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - private function show() { - echo "Call show()\n"; - } - - public function do_show() { - $this->show(); - } -} - -class fail extends pass { - function do_show() { - $this->show(); - } -} - -$t = new pass(); -$t->do_show(); - -$t2 = new fail(); -$t2->do_show(); - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call show() - -Fatal error: Call to private method pass::show() from context 'fail' in %s on line %d
\ No newline at end of file diff --git a/tests/classes/private_005.phpt b/tests/classes/private_005.phpt deleted file mode 100644 index 49b2bee3ba..0000000000 --- a/tests/classes/private_005.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -ZE2 A private method cannot be called in a derived class ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - private static function show() { - echo "Call show()\n"; - } - - public static function do_show() { - pass::show(); - } -} - -class fail extends pass { - static function do_show() { - pass::show(); - } -} - -pass::do_show(); -fail::do_show(); - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call show() - -Fatal error: Call to private method pass::show() from context 'fail' in %s on line %d diff --git a/tests/classes/private_005b.phpt b/tests/classes/private_005b.phpt deleted file mode 100644 index ea3fe610d3..0000000000 --- a/tests/classes/private_005b.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -ZE2 A private method cannot be called in a derived class ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - private function show() { - echo "Call show()\n"; - } - - public function do_show() { - $this->show(); - } -} - -class fail extends pass { - function do_show() { - $this->show(); - } -} - -$t = new pass(); -$t->do_show(); - -$t2 = new fail(); -$t2->do_show(); - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call show() - -Fatal error: Call to private method pass::show() from context 'fail' in %s on line %d
\ No newline at end of file diff --git a/tests/classes/private_006.phpt b/tests/classes/private_006.phpt deleted file mode 100644 index 0bb2b3fe4b..0000000000 --- a/tests/classes/private_006.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -ZE2 A private method can be overwritten in a second derived class ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php -class first { - private static function show() { - echo "Call show()\n"; - } - - public static function do_show() { - first::show(); - } -} - -first::do_show(); - -class second extends first { -} - -second::do_show(); - -class third extends second { -} - -third::do_show(); - -class fail extends third { - static function show() { // cannot be redeclared - echo "Call show()\n"; - } -} - -echo "Done\n"; -?> ---EXPECTF-- -Call show() -Call show() -Call show() -Done diff --git a/tests/classes/private_006b.phpt b/tests/classes/private_006b.phpt deleted file mode 100644 index 950f16a3c4..0000000000 --- a/tests/classes/private_006b.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -ZE2 A private method can be overwritten in a second derived class ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class first { - private function show() { - echo "Call show()\n"; - } - - public function do_show() { - $this->show(); - } -} - -$t1 = new first(); -$t1->do_show(); - -class second extends first { -} - -//$t2 = new second(); -//$t2->do_show(); - -class third extends second { - private function show() { - echo "Call show()\n"; - } -} - -$t3 = new third(); -$t3->do_show(); - -echo "Done\n"; -?> ---EXPECTF-- -Call show() -Call show() -Done
\ No newline at end of file diff --git a/tests/classes/private_007.phpt b/tests/classes/private_007.phpt deleted file mode 100644 index 73a38c4562..0000000000 --- a/tests/classes/private_007.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -ZE2 A derived class does not know about privates of ancestors ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class Bar { - public static function pub() { - Bar::priv(); - } - private static function priv() { - echo "Bar::priv()\n"; - } -} -class Foo extends Bar { - public static function priv() { - echo "Foo::priv()\n"; - } -} - -Foo::pub(); -Foo::priv(); - -echo "Done\n"; -?> ---EXPECTF-- -Bar::priv() -Foo::priv() -Done diff --git a/tests/classes/private_007b.phpt b/tests/classes/private_007b.phpt deleted file mode 100644 index 02ddc25dec..0000000000 --- a/tests/classes/private_007b.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -ZE2 A derived class does not know about privates of ancestors ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class Bar { - public function pub() { - $this->priv(); - } - private function priv() { - echo "Bar::priv()\n"; - } -} -class Foo extends Bar { - public function priv() { - echo "Foo::priv()\n"; - } -} - -$obj = new Foo(); -$obj->pub(); -$obj->priv(); - -echo "Done\n"; -?> ---EXPECTF-- -Bar::priv() -Foo::priv() -Done diff --git a/tests/classes/private_members.phpt b/tests/classes/private_members.phpt deleted file mode 100755 index 1832ea0c43..0000000000 --- a/tests/classes/private_members.phpt +++ /dev/null @@ -1,103 +0,0 @@ ---TEST-- -ZE2 A private member is ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class base -{ - private $member; - - function __construct() - { - echo __METHOD__ . "(begin)\n"; - $this->member = 'base::member'; - $this->test(); - echo __METHOD__ . "(end)\n"; - } - - function test() - { - echo __METHOD__ . "\n"; - print_r($this); - } -} - -class derived extends base -{ - public $member = 'derived::member (default)'; - - function __construct() - { - echo __METHOD__ . "(begin)\n"; - parent::__construct(); - parent::test(); - $this->test(); - $this->member = 'derived::member'; - echo __METHOD__ . "(end)\n"; - } - - function test() - { - parent::test(); - echo __METHOD__ . "\n"; - print_r($this); - } -} - -$t = new derived; -$t->test(); -unset($t); - -echo "Done\n"; - -?> ---EXPECTF-- -derived::__construct(begin) -base::__construct(begin) -base::test -derived Object -( - [member] => derived::member (default) - [member:private] => base::member -) -derived::test -derived Object -( - [member] => derived::member (default) - [member:private] => base::member -) -base::__construct(end) -base::test -derived Object -( - [member] => derived::member (default) - [member:private] => base::member -) -base::test -derived Object -( - [member] => derived::member (default) - [member:private] => base::member -) -derived::test -derived Object -( - [member] => derived::member (default) - [member:private] => base::member -) -derived::__construct(end) -base::test -derived Object -( - [member] => derived::member - [member:private] => base::member -) -derived::test -derived Object -( - [member] => derived::member - [member:private] => base::member -) -Done diff --git a/tests/classes/private_redeclare.phpt b/tests/classes/private_redeclare.phpt deleted file mode 100755 index e3061f1136..0000000000 --- a/tests/classes/private_redeclare.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -ZE2 A derived class does not know anything about inherited private methods ---FILE-- -<?php -class base { - private function show() { - echo "base\n"; - } - function test() { - $this->show(); - } -} - -$t = new base(); -$t->test(); - -class derived extends base { - function show() { - echo "derived\n"; - } - function test() { - echo "test\n"; - $this->show(); - parent::test(); - parent::show(); - } -} - -$t = new derived(); -$t->test(); -?> ---EXPECTF-- -base -test -derived -base - -Fatal error: Call to private method base::show() from context 'derived' in %s on line %d diff --git a/tests/classes/protected_001.phpt b/tests/classes/protected_001.phpt deleted file mode 100644 index 19872c6f16..0000000000 --- a/tests/classes/protected_001.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -ZE2 A protected method can only be called inside the class ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - protected static function fail() { - echo "Call fail()\n"; - } - - public static function good() { - pass::fail(); - } -} - -pass::good(); -pass::fail();// must fail because we are calling from outside of class pass - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call fail() - -Fatal error: Call to protected method pass::fail() from context '' in %s on line %d diff --git a/tests/classes/protected_001b.phpt b/tests/classes/protected_001b.phpt deleted file mode 100644 index 4d24a926ea..0000000000 --- a/tests/classes/protected_001b.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -ZE2 A protected method can only be called inside the class ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - protected function fail() { - echo "Call fail()\n"; - } - - public function good() { - $this->fail(); - } -} - -$t = new pass(); -$t->good(); -$t->fail();// must fail because we are calling from outside of class pass - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call fail() - -Fatal error: Call to protected method pass::fail() from context '' in %s on line %d diff --git a/tests/classes/protected_002.phpt b/tests/classes/protected_002.phpt deleted file mode 100644 index f26ef9c495..0000000000 --- a/tests/classes/protected_002.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -ZE2 A protected method cannot be called in another class ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - protected static function show() { - echo "Call pass::show()\n"; - } - - public static function do_show() { - pass::show(); - } -} - -pass::do_show(); - -class fail { - public static function show() { - echo "Call fail::show()\n"; - pass::show(); - } -} - -fail::show(); - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Call pass::show() -Call fail::show() - -Fatal error: Call to protected method pass::show() from context 'fail' in %s on line %d diff --git a/tests/classes/singleton_001.phpt b/tests/classes/singleton_001.phpt deleted file mode 100644 index ee729b980c..0000000000 --- a/tests/classes/singleton_001.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -ZE2 singleton ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class Counter { - private $counter = 0; - - function increment_and_print() { - echo ++$this->counter; - echo "\n"; - } -} - - -class SingletonCounter { - private static $m_instance = NULL; - - static function Instance() { - if (self::$m_instance == NULL) { - self::$m_instance = new Counter(); - } - return self::$m_instance; - } -} - -SingletonCounter::Instance()->increment_and_print(); -SingletonCounter::Instance()->increment_and_print(); -SingletonCounter::Instance()->increment_and_print(); - -?> ---EXPECT-- -1 -2 -3 diff --git a/tests/classes/static_mix_1.phpt b/tests/classes/static_mix_1.phpt deleted file mode 100644 index ecc9c01a28..0000000000 --- a/tests/classes/static_mix_1.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -ZE2 You cannot overload a static method with a non static method ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - static function show() { - echo "Call to function pass::show()\n"; - } -} - -class fail extends pass { - function show() { - echo "Call to function fail::show()\n"; - } -} - -pass::show(); -fail::show(); - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Fatal error: Cannot make static method pass::show() non static in class fail in %s on line %d
\ No newline at end of file diff --git a/tests/classes/static_mix_2.phpt b/tests/classes/static_mix_2.phpt deleted file mode 100644 index bbdaedf50a..0000000000 --- a/tests/classes/static_mix_2.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -ZE2 You cannot overload a non static method with a static method ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class pass { - function show() { - echo "Call to function pass::show()\n"; - } -} - -class fail extends pass { - static function show() { - echo "Call to function fail::show()\n"; - } -} - -$t = new pass(); -$t->show(); -fail::show(); - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Fatal error: Cannot make non static method pass::show() static in class fail in %s on line %d
\ No newline at end of file diff --git a/tests/classes/static_properties_001.phpt b/tests/classes/static_properties_001.phpt deleted file mode 100755 index 1c34f68fc5..0000000000 --- a/tests/classes/static_properties_001.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -ZE2 Initializing static properties to arrays ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class test { - static public $ar = array(); -} - -var_dump(test::$ar); - -test::$ar[] = 1; - -var_dump(test::$ar); - -echo "Done\n"; -?> ---EXPECTF-- -array(0) { -} -array(1) { - [0]=> - int(1) -} -Done diff --git a/tests/classes/tostring.phpt b/tests/classes/tostring.phpt deleted file mode 100644 index e62399bde7..0000000000 --- a/tests/classes/tostring.phpt +++ /dev/null @@ -1,99 +0,0 @@ ---TEST-- -ZE2 __toString() ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class test1 { -} - -class test2 { - function __toString() { - echo __METHOD__ . "()\n"; - return "Converted\n"; - } -} - -echo "====test1====\n"; -$o = new test1; -print_r($o); -var_dump((string)$o); -var_dump($o); - -echo "====test2====\n"; -$o = new test2; -print_r($o); -print $o; -var_dump($o); -echo "====test3====\n"; -echo $o; - -echo "====test4====\n"; -echo "string:".$o; - -echo "====test5====\n"; -echo 1 . $o; - -echo "====test6====\n"; -echo $o.$o; - -echo "====test7====\n"; -$ar = array(); -$ar[$o->__toString()] = "ERROR"; -echo $ar[$o]; - -echo "====test8====\n"; -var_dump(trim($o)); -var_dump(trim((string)$o)); - -echo "====test9====\n"; -echo sprintf("%s", $o); -?> -====DONE!==== ---EXPECTF-- -====test1==== -test1 Object -( -) - -Notice: Object of class test1 could not be converted to string in %stostring.php on line %d -string(12) "Object id #%d" -object(test1)#%d (0) { -} -====test2==== -test2 Object -( -) -test2::__toString() -Converted -object(test2)#%d (0) { -} -====test3==== -test2::__toString() -Converted -====test4==== -test2::__toString() -string:Converted -====test5==== -test2::__toString() -1Converted -====test6==== -test2::__toString() -test2::__toString() -Converted -Converted -====test7==== -test2::__toString() - -Warning: Illegal offset type in %stostring.php on line %d -====test8==== - -Notice: Object of class test2 could not be converted to string in %stostring.php on line %d -string(6) "Object" -test2::__toString() -string(9) "Converted" -====test9==== -test2::__toString() -Converted -====DONE!==== diff --git a/tests/classes/type_hinting_001.phpt b/tests/classes/type_hinting_001.phpt deleted file mode 100644 index d4042a496d..0000000000 --- a/tests/classes/type_hinting_001.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -ZE2 class type hinting ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -interface Foo { - function a(Foo $foo); -} - -interface Bar { - function b(Bar $bar); -} - -class FooBar implements Foo, Bar { - function a(Foo $foo) { - // ... - } - - function b(Bar $bar) { - // ... - } -} - -class Blort { -} - -$a = new FooBar; -$b = new Blort; - -$a->a($b); -$a->b($b); - -?> ---EXPECTF-- - -Fatal error: Argument 1 must implement interface Foo in %s on line %d diff --git a/tests/classes/visibility_000a.phpt b/tests/classes/visibility_000a.phpt deleted file mode 100644 index 2524494ff8..0000000000 --- a/tests/classes/visibility_000a.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - protected function f0() {} -} - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Fatal error: Access level to fail::f0() must be public (as in class same) in %s on line %d diff --git a/tests/classes/visibility_000b.phpt b/tests/classes/visibility_000b.phpt deleted file mode 100644 index 9305467323..0000000000 --- a/tests/classes/visibility_000b.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - private function f0() {} -} - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Fatal error: Access level to fail::f0() must be public (as in class same) in %s on line %d diff --git a/tests/classes/visibility_000c.phpt b/tests/classes/visibility_000c.phpt deleted file mode 100644 index 064106e979..0000000000 --- a/tests/classes/visibility_000c.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - function f0() {} -} - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Done diff --git a/tests/classes/visibility_001a.phpt b/tests/classes/visibility_001a.phpt deleted file mode 100644 index ebd1cc34de..0000000000 --- a/tests/classes/visibility_001a.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - protected function f1() {} -} - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Fatal error: Access level to fail::f1() must be public (as in class same) in %s on line %d diff --git a/tests/classes/visibility_001b.phpt b/tests/classes/visibility_001b.phpt deleted file mode 100644 index e61078ede5..0000000000 --- a/tests/classes/visibility_001b.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - private function f1() {} -} - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Fatal error: Access level to fail::f1() must be public (as in class same) in %s on line %d diff --git a/tests/classes/visibility_001c.phpt b/tests/classes/visibility_001c.phpt deleted file mode 100644 index bb1075aaed..0000000000 --- a/tests/classes/visibility_001c.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - function f1() {} -} - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Done diff --git a/tests/classes/visibility_002a.phpt b/tests/classes/visibility_002a.phpt deleted file mode 100644 index 6c88d204d2..0000000000 --- a/tests/classes/visibility_002a.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - protected function f2() {} -} - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Fatal error: Access level to fail::f2() must be public (as in class same) in %s on line %d diff --git a/tests/classes/visibility_002b.phpt b/tests/classes/visibility_002b.phpt deleted file mode 100644 index 71f47c3954..0000000000 --- a/tests/classes/visibility_002b.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - private function f2() {} -} - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Fatal error: Access level to fail::f2() must be public (as in class same) in %s on line %d diff --git a/tests/classes/visibility_002c.phpt b/tests/classes/visibility_002c.phpt deleted file mode 100644 index 5edae1d068..0000000000 --- a/tests/classes/visibility_002c.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - function f2() {} -} - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Done diff --git a/tests/classes/visibility_003a.phpt b/tests/classes/visibility_003a.phpt deleted file mode 100644 index 1693386f81..0000000000 --- a/tests/classes/visibility_003a.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - public function f3() {} -} - -echo "Done\n"; -?> ---EXPECTF-- -Done diff --git a/tests/classes/visibility_003b.phpt b/tests/classes/visibility_003b.phpt deleted file mode 100644 index fcfdbe3c55..0000000000 --- a/tests/classes/visibility_003b.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - private function f3() {} -} - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Fatal error: Access level to fail::f3() must be protected (as in class same) or weaker in %s on line %d diff --git a/tests/classes/visibility_003c.phpt b/tests/classes/visibility_003c.phpt deleted file mode 100644 index d94a9c116b..0000000000 --- a/tests/classes/visibility_003c.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - function f3() {} -} - -echo "Done\n"; -?> ---EXPECTF-- -Done diff --git a/tests/classes/visibility_004a.phpt b/tests/classes/visibility_004a.phpt deleted file mode 100644 index 6f16a09edd..0000000000 --- a/tests/classes/visibility_004a.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - public function f4() {} -} - -echo "Done\n"; -?> ---EXPECTF-- -Done diff --git a/tests/classes/visibility_004b.phpt b/tests/classes/visibility_004b.phpt deleted file mode 100644 index 74a83185ee..0000000000 --- a/tests/classes/visibility_004b.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - protected function f4() {} -} - -echo "Done\n"; // shouldn't be displayed -?> ---EXPECTF-- -Done diff --git a/tests/classes/visibility_004c.phpt b/tests/classes/visibility_004c.phpt deleted file mode 100644 index 92a770374e..0000000000 --- a/tests/classes/visibility_004c.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ZE2 A redeclared method must have the same or higher visibility ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class father { - function f0() {} - function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class same extends father { - - // overload fn with same visibility - function f0() {} - public function f1() {} - public function f2() {} - protected function f3() {} - private function f4() {} -} - -class fail extends same { - function f4() {} -} - -echo "Done\n"; -?> ---EXPECTF-- -Done diff --git a/tests/classes/visibility_005.phpt b/tests/classes/visibility_005.phpt deleted file mode 100755 index 1b15fb5e5b..0000000000 --- a/tests/classes/visibility_005.phpt +++ /dev/null @@ -1,58 +0,0 @@ ---TEST-- -ZE2 foreach and property visibility ---FILE-- -<?php - -class base -{ - public $a=1; - protected $b=2; - private $c=3; - - function f() - { - foreach($this as $k=>$v) { - echo "$k=>$v\n"; - } - } -} - -class derived extends base -{ -} - -$o = new base; -$o->d = 4; -echo "===base::function===\n"; -$o->f(); -echo "===base,foreach===\n"; -foreach($o as $k=>$v) { - echo "$k=>$v\n"; -} - -$o = new derived; -$o->d = 4; -echo "===derived::function===\n"; -$o->f(); -echo "===derived,foreach===\n"; -foreach($o as $k=>$v) { - echo "$k=>$v\n"; -} - -?> ---EXPECT-- -===base::function=== -a=>1 -b=>2 -c=>3 -d=>4 -===base,foreach=== -a=>1 -d=>4 -===derived::function=== -a=>1 -b=>2 -d=>4 -===derived,foreach=== -a=>1 -d=>4 diff --git a/tests/foo b/tests/foo deleted file mode 100644 index 125c655b0f..0000000000 --- a/tests/foo +++ /dev/null @@ -1,5 +0,0 @@ -a -b -@c@ -d -e diff --git a/tests/foo2 b/tests/foo2 deleted file mode 100644 index 4cdd41e3dc..0000000000 --- a/tests/foo2 +++ /dev/null @@ -1,3 +0,0 @@ -<? - -print $a->b(12,13)."\n"; diff --git a/tests/foo3 b/tests/foo3 deleted file mode 100644 index 08681b98c2..0000000000 --- a/tests/foo3 +++ /dev/null @@ -1,43 +0,0 @@ -<? - -class foo { - function foo() { - print "foo()\n"; - } - function bar(&$blah, $foobar=7) { - $foobar += 19; - } - - function hello_world() { - return "Hello, World!"; - } - - function print_string($str) { - print "$str\n"; - return 666; - } - var $foo; - var $bar="this is a test..."; -}; - -class bar { - function foo($a,$b) { - $a *= 3; - return $a+$b; - } - function bar(&$blah, $foobar=7) { - $foobar += 19; - } - - var $foo; - var $bar="this is a test..."; -}; - - -$b = new foo; -$a = $b; -print $a->print_string($a->hello_world())."\n"; -print $b->print_string($b->hello_world())."\n"; -$a->foo = 5; -print $a->foo; -print $a->foo(); diff --git a/tests/foo4 b/tests/foo4 deleted file mode 100644 index 29df84d0e2..0000000000 --- a/tests/foo4 +++ /dev/null @@ -1,41 +0,0 @@ -<? - -class foo { - function foo($a,$b) { - $a *= 3; - return $a+$b; - } - function bar(&$blah, $foobar=7) { - $foobar += 19; - } - - function hello_world() { - return "Hello, World!"; - } - - function print_string($str) { - print "$str\n"; - return 666; - } - var $foo; - var $bar="this is a test...."; -}; - -class bar { - function foo($a,$b) { - $a *= 3; - return $a+$b; - } - function bar(&$blah, $foobar=7) { - $foobar += 19; - } - - var $foo; - var $bar="this is a test..."; -}; - - -$b = new foo; -$a = &$b; -$b->asd = 5; -print $b->asd; diff --git a/tests/func/001.phpt b/tests/func/001.phpt deleted file mode 100644 index d08040679b..0000000000 --- a/tests/func/001.phpt +++ /dev/null @@ -1,6 +0,0 @@ ---TEST-- -Strlen() function test ---FILE-- -<?php echo strlen("abcdef")?> ---EXPECT-- -6 diff --git a/tests/func/002.phpt b/tests/func/002.phpt deleted file mode 100644 index 84e00eeeb5..0000000000 --- a/tests/func/002.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -Static variables in functions ---SKIPIF-- -<?php if(version_compare(zend_version(), "2.0.0-dev", '>=')) echo "skip removed in Zend Engine 2\n"; ?> ---FILE-- -<?php -old_function blah ( - 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 deleted file mode 100644 index 8afaf8a326..0000000000 --- a/tests/func/003.phpt +++ /dev/null @@ -1,289 +0,0 @@ ---TEST-- -General function test ---SKIPIF-- -<?php if(version_compare(zend_version(), "2.0.0-dev", '>=')) echo "skip removed in Zend Engine 2\n"; ?> ---FILE-- -<?php - -old_function a ( - 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 deleted file mode 100644 index 7ef452be66..0000000000 --- a/tests/func/004.phpt +++ /dev/null @@ -1,65 +0,0 @@ ---TEST-- -General function test ---SKIPIF-- -<?php if(version_compare(zend_version(), "2.0.0-dev", '>=')) echo "skip removed in Zend Engine 2\n"; ?> ---FILE-- -<?php - -echo "Before function declaration...\n"; - -old_function print_something_multiple_times $something,$times ( - 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 deleted file mode 100644 index c4215feb49..0000000000 --- a/tests/func/005.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -Testing register_shutdown_function() ---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/func/005a.phpt b/tests/func/005a.phpt deleted file mode 100644 index f7843e10a3..0000000000 --- a/tests/func/005a.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Testing register_shutdown_function() with timeout. (Bug: #21513) ---FILE-- -<?php - -ini_set('display_errors', 0); - -echo "Start\n"; - -function boo() -{ - echo "Shutdown\n"; -} - -register_shutdown_function("boo"); - -/* not necessary, just to show the error sooner */ -set_time_limit(1); - -/* infinite loop to simulate long processing */ -for (;;) {} - -echo "End\n"; - -?> ---EXPECT-- -Start -Shutdown diff --git a/tests/func/006.phpt b/tests/func/006.phpt deleted file mode 100644 index 077b6f873c..0000000000 --- a/tests/func/006.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Output buffering tests ---INI-- -output_buffering=0 -output_handler= -zlib.output_compression=0 -zlib.output_handler= ---FILE-- -<?php -ob_start(); -echo ob_get_level(); -echo 'A'; - ob_start(); - echo ob_get_level(); - echo 'B'; - $b = ob_get_contents(); - ob_end_clean(); -$a = ob_get_contents(); -ob_end_clean(); - -var_dump( $b ); // 2B -var_dump( $a ); // 1A -?> ---EXPECT-- -string(2) "2B" -string(2) "1A" diff --git a/tests/func/007.phpt b/tests/func/007.phpt deleted file mode 100644 index 73aae2e649..0000000000 --- a/tests/func/007.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -INI functions test ---FILE-- -<?php - -$ini1 = ini_get('include_path'); -ini_set('include_path','ini_set_works'); -echo ini_get('include_path')."\n"; -ini_restore('include_path'); -$ini2 = ini_get('include_path'); - -if ($ini1 !== $ini2) { - echo "ini_restore() does not work.\n"; -} -else { - echo "ini_restore_works\n"; -} - -?> ---EXPECT-- -ini_set_works -ini_restore_works diff --git a/tests/func/008.phpt b/tests/func/008.phpt deleted file mode 100644 index 48098e1330..0000000000 --- a/tests/func/008.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -Test for buffering in core functions with implicit flush off ---INI-- -implicit_flush=0 ---FILE-- -<?php -$res = var_export("foo1"); -echo "\n"; -$res = var_export("foo2", TRUE); -echo "\n"; -echo $res."\n"; -?> ---EXPECT-- -'foo1' - -'foo2' diff --git a/tests/func/009.phpt b/tests/func/009.phpt deleted file mode 100644 index 05b40e8e67..0000000000 --- a/tests/func/009.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -Test for buffering in core functions with implicit flush on ---INI-- -implicit_flush=1 ---FILE-- -<?php -$res = var_export("foo1"); -echo "\n"; -$res = var_export("foo2", TRUE); -echo "\n"; -echo $res."\n"; -?> ---EXPECT-- -'foo1' - -'foo2' diff --git a/tests/lang/001.phpt b/tests/lang/001.phpt deleted file mode 100644 index d90e9b8d3d..0000000000 --- a/tests/lang/001.phpt +++ /dev/null @@ -1,8 +0,0 @@ ---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 deleted file mode 100644 index dd2c83b4f6..0000000000 --- a/tests/lang/002.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -Simple While Loop Test ---POST-- ---GET-- ---FILE-- -<?php -$a=1; -while ($a<10) { - echo $a; - $a++; -} -?> ---EXPECT-- -123456789 diff --git a/tests/lang/003.phpt b/tests/lang/003.phpt deleted file mode 100644 index cb2a3c38cd..0000000000 --- a/tests/lang/003.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---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; -} -?> ---EXPECT-- -good diff --git a/tests/lang/004.phpt b/tests/lang/004.phpt deleted file mode 100644 index bd47328c16..0000000000 --- a/tests/lang/004.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Simple If/Else Test ---POST-- ---GET-- ---FILE-- -<?php -$a=1; -if($a==0) { - echo "bad"; -} else { - echo "good"; -} -?> ---EXPECT-- -good diff --git a/tests/lang/005.phpt b/tests/lang/005.phpt deleted file mode 100644 index f74590e860..0000000000 --- a/tests/lang/005.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---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"; -} -?> ---EXPECT-- -good diff --git a/tests/lang/006.phpt b/tests/lang/006.phpt deleted file mode 100644 index e9e8c2357f..0000000000 --- a/tests/lang/006.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---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"; - } -} -?> ---EXPECT-- -good diff --git a/tests/lang/007.phpt b/tests/lang/007.phpt deleted file mode 100644 index 04af8111fd..0000000000 --- a/tests/lang/007.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---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 deleted file mode 100644 index 1e9c86ff5a..0000000000 --- a/tests/lang/008.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---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 deleted file mode 100644 index 96278c22b1..0000000000 --- a/tests/lang/009.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -Testing function parameter passing ---POST-- ---GET-- ---FILE-- -<?php -function test ($a,$b) { - echo $a+$b; -} -test(1,2); -?> ---EXPECT-- -3 diff --git a/tests/lang/010.phpt b/tests/lang/010.phpt deleted file mode 100644 index e414baae6e..0000000000 --- a/tests/lang/010.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Testing function parameter passing with a return value ---POST-- ---GET-- ---FILE-- -<?php -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 deleted file mode 100644 index e648623845..0000000000 --- a/tests/lang/011.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---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 deleted file mode 100644 index b54132b906..0000000000 --- a/tests/lang/012.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -Testing stack after early function return ---POST-- ---GET-- ---FILE-- -<?php -function F () { - if(1) { - return("Hello"); - } -} - -$i=0; -while ($i<2) { - echo F(); - $i++; -} -?> ---EXPECT-- -HelloHello diff --git a/tests/lang/013.phpt b/tests/lang/013.phpt deleted file mode 100644 index 4b661c071a..0000000000 --- a/tests/lang/013.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---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 deleted file mode 100644 index 6338d7c23c..0000000000 --- a/tests/lang/014.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Testing eval function inside user-defined function ---POST-- ---GET-- ---FILE-- -<?php -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 deleted file mode 100755 index d436a7bb14..0000000000 --- a/tests/lang/015.inc +++ /dev/null @@ -1,3 +0,0 @@ -<?php - echo "Hello"; -?> diff --git a/tests/lang/015.phpt b/tests/lang/015.phpt deleted file mode 100644 index 399f802866..0000000000 --- a/tests/lang/015.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -Testing include ---POST-- ---GET-- ---FILE-- -<?php -include "015.inc"; -?> ---EXPECT-- -Hello diff --git a/tests/lang/016.inc b/tests/lang/016.inc deleted file mode 100755 index b73333f7b0..0000000000 --- a/tests/lang/016.inc +++ /dev/null @@ -1,5 +0,0 @@ -<?php -function MyFunc ($a) { - echo $a; -} -?> diff --git a/tests/lang/016.phpt b/tests/lang/016.phpt deleted file mode 100644 index 49c4d4d1a6..0000000000 --- a/tests/lang/016.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---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 deleted file mode 100644 index bb18194e5d..0000000000 --- a/tests/lang/017.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -Testing user-defined function falling out of an If into another ---POST-- ---GET-- ---FILE-- -<?php -$a = 1; -function Test ($a) { - if ($a<3) { - return(3); - } -} - -if ($a < Test($a)) { - echo "$a\n"; - $a++; -} -?> ---EXPECT-- -1 diff --git a/tests/lang/018.phpt b/tests/lang/018.phpt deleted file mode 100644 index 8ef867cb62..0000000000 --- a/tests/lang/018.phpt +++ /dev/null @@ -1,36 +0,0 @@ ---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 deleted file mode 100644 index f8339b94a3..0000000000 --- a/tests/lang/019.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -eval() test ---POST-- ---GET-- ---FILE-- -<?php - -error_reporting(0); - -eval("function 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 deleted file mode 100644 index e82ba6c467..0000000000 --- a/tests/lang/020.phpt +++ /dev/null @@ -1,78 +0,0 @@ ---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 deleted file mode 100644 index 132ffc20c4..0000000000 --- a/tests/lang/021.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---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 deleted file mode 100644 index e1847b2c0e..0000000000 --- a/tests/lang/022.phpt +++ /dev/null @@ -1,65 +0,0 @@ ---TEST-- -Switch test 3 ---POST-- ---GET-- ---FILE-- -<?php - -function 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"; - } -} -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 deleted file mode 100755 index 8d52e844c9..0000000000 --- a/tests/lang/023-1.inc +++ /dev/null @@ -1,356 +0,0 @@ -<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 deleted file mode 100755 index 6dd1e730f1..0000000000 --- a/tests/lang/023-2.inc +++ /dev/null @@ -1,6 +0,0 @@ -<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 deleted file mode 100644 index 4d7c4d5b5b..0000000000 --- a/tests/lang/023.phpt +++ /dev/null @@ -1,256 +0,0 @@ ---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 deleted file mode 100644 index 848c5fbea8..0000000000 --- a/tests/lang/024.phpt +++ /dev/null @@ -1,11625 +0,0 @@ ---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("023-2.inc"); ?> -******************************** - -<?php -{ - echo "Tests completed.\n"; # testing some PHP style comment... -} - -} ?> ---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 deleted file mode 100644 index 4f5397d5a8..0000000000 --- a/tests/lang/025.phpt +++ /dev/null @@ -1,533 +0,0 @@ ---TEST-- -Mean recursion test ---POST-- ---GET-- ---FILE-- -<?php -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 deleted file mode 100644 index e201b75638..0000000000 --- a/tests/lang/026.phpt +++ /dev/null @@ -1,8 +0,0 @@ ---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 deleted file mode 100644 index 5cd44e0fab..0000000000 --- a/tests/lang/027.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---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 deleted file mode 100644 index 4d95960dd3..0000000000 --- a/tests/lang/028.phpt +++ /dev/null @@ -1,1060 +0,0 @@ ---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(); - -print $name=call_user_func(array(&$dafna,"GetMyName")); -print "\n"; - -?> ---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 - diff --git a/tests/lang/030.phpt b/tests/lang/030.phpt deleted file mode 100644 index ba809c8e31..0000000000 --- a/tests/lang/030.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -$this in constructor test ---POST-- ---GET-- ---FILE-- -<?php -class foo { - function foo($name) { - $GLOBALS['List']= &$this; - $this->Name = $name; - $GLOBALS['List']->echoName(); - } - - function echoName() { - $GLOBALS['names'][]=$this->Name; - } -} - -function &foo2(&$foo) { - return $foo; -} - - -$bar1 =& new foo('constructor'); -$bar1->Name = 'outside'; -$bar1->echoName(); -$List->echoName(); - -$bar1 =& foo2(new foo('constructor')); -$bar1->Name = 'outside'; -$bar1->echoName(); - -$List->echoName(); - -print ($names==array('constructor','outside','outside','constructor','outside','outside')) ? 'success':'failure'; -?> ---EXPECT-- -success diff --git a/tests/lang/031.phpt b/tests/lang/031.phpt deleted file mode 100644 index af99f3d219..0000000000 --- a/tests/lang/031.phpt +++ /dev/null @@ -1,72 +0,0 @@ ---TEST-- -Internal hash position bug on assignment (Bug #16227) ---POST-- ---GET-- ---FILE-- -<?php -// reported by php.net@alienbill.com -$arrayOuter = array("key1","key2"); -$arrayInner = array("0","1"); - -print "Correct - with inner loop reset.\n"; - -while(list(,$o) = each($arrayOuter)){ - reset($arrayInner); - while(list(,$i) = each($arrayInner)){ - print "inloop $i for $o\n"; - } -} -reset($arrayOuter); -reset($arrayInner); - -print "What happens without inner loop reset.\n"; - -while(list(,$o) = each($arrayOuter)){ - while(list(,$i) = each($arrayInner)){ - print "inloop $i for $o\n"; - } -} -reset($arrayOuter); -reset($arrayInner); - -print "What happens without inner loop reset but copy.\n"; - -while(list(,$o) = each($arrayOuter)){ - $placeholder = $arrayInner; - while(list(,$i) = each($arrayInner)){ - print "inloop $i for $o\n"; - } -} -reset($arrayOuter); -reset($arrayInner); - -print "What happens with inner loop reset over copy.\n"; - -while(list(,$o) = each($arrayOuter)){ - $placeholder = $arrayInner; - while(list(,$i) = each($placeholder)){ - print "inloop $i for $o\n"; - } -} -reset($arrayOuter); -reset($arrayInner); -?> ---EXPECT-- -Correct - with inner loop reset. -inloop 0 for key1 -inloop 1 for key1 -inloop 0 for key2 -inloop 1 for key2 -What happens without inner loop reset. -inloop 0 for key1 -inloop 1 for key1 -What happens without inner loop reset but copy. -inloop 0 for key1 -inloop 1 for key1 -inloop 0 for key2 -inloop 1 for key2 -What happens with inner loop reset over copy. -inloop 0 for key1 -inloop 1 for key1 -inloop 0 for key2 -inloop 1 for key2 diff --git a/tests/lang/032.phpt b/tests/lang/032.phpt deleted file mode 100644 index 6000398ed6..0000000000 --- a/tests/lang/032.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -Class method registration ---POST-- ---GET-- ---FILE-- -<?php -class A { - function foo() {} -} - -class B extends A { - function foo() {} -} - -class C extends B { - function foo() {} -} - -class D extends A { -} - -class F extends D { - function foo() {} -} - -// Following class definition should fail, but cannot test -/* -class X { - function foo() {} - function foo() {} -} -*/ - -echo "OK\n"; -?> ---EXPECT-- -OK - diff --git a/tests/lang/033.phpt b/tests/lang/033.phpt deleted file mode 100644 index 724c67b225..0000000000 --- a/tests/lang/033.phpt +++ /dev/null @@ -1,53 +0,0 @@ ---TEST-- -Alternative syntaxes test ---SKIPIF-- -<?php if(version_compare(zend_version(), "2.0.0-dev", '>=')) echo "skip removed in Zend Engine 2\n"; ?> ---FILE-- -<?php -$a = 1; - -echo "If: "; -if ($a) echo 1; else echo 0; -if ($a): - echo 1; -else: - echo 0; -endif; - -echo "\nWhile: "; -while ($a<5) echo $a++; -while ($a<9): - echo ++$a; -endwhile; - -echo "\nFor: "; -for($a=0;$a<5;$a++) echo $a; -for($a=0;$a<5;$a++): - echo $a; -endfor; - -echo "\nSwitch: "; -switch ($a): - case 0; - echo 0; - break; - case 5: - echo 1; - break; - default; - echo 0; - break; -endswitch; - -echo "\nold_function: "; -old_function foo $bar, $baz ( - return sprintf("foo(%s, %s);\n", $bar, $baz); -); -echo foo(1,2); -?> ---EXPECT-- -If: 11 -While: 12346789 -For: 0123401234 -Switch: 1 -old_function: foo(1, 2); diff --git a/tests/lang/034.phpt b/tests/lang/034.phpt deleted file mode 100644 index 9b10603c83..0000000000 --- a/tests/lang/034.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -Locale settings affecting float parsing ---SKIPIF-- -<?php # try to activate a german locale -if (setlocale(LC_NUMERIC, "de_DE", "de", "german", "ge") === FALSE) { - print "skip"; -} -?> ---POST-- ---GET-- ---FILE-- -<?php -# activate the german locale -setlocale(LC_NUMERIC, "de_DE", "de", "german", "ge"); - -echo (float)"3.14", "\n"; - -?> ---EXPECT-- -3,14 diff --git a/tests/lang/035.phpt b/tests/lang/035.phpt deleted file mode 100644 index c6970b7bdf..0000000000 --- a/tests/lang/035.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -ZE2: set_exception_handler() ---SKIPIF-- -<?php if (version_compare(zend_version(), "2.0.0-dev", "<")) print "skip Zend engine 2 required"; ?> ---FILE-- -<?php -class MyException { - function MyException($_error) { - $this->error = $_error; - } - - function getException() - { - return $this->error; - } -} - -function ThrowException() -{ - throw new MyException("'This is an exception!'"); -} - - -try { -} catch (MyException $exception) { - print "There shouldn't be an exception: " . $exception->getException(); - print "\n"; -} - -try { - ThrowException(); -} catch (MyException $exception) { - print "There was an exception: " . $exception->getException(); - print "\n"; -} -?> ---EXPECT-- -There was an exception: 'This is an exception!' diff --git a/tests/lang/036.phpt b/tests/lang/036.phpt deleted file mode 100755 index 474316e363..0000000000 --- a/tests/lang/036.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Child public element should not override parent private element in parent methods ---FILE-- -<?php -class par { - private $id = "foo"; - - function displayMe() - { - print $this->id; - } -}; - -class chld extends par { - public $id = "bar"; - function displayHim() - { - parent::displayMe(); - } -}; - - -$obj = new chld(); -$obj->displayHim(); -?> ---EXPECT-- -foo diff --git a/tests/lang/037.phpt b/tests/lang/037.phpt deleted file mode 100755 index c2a1ee312f..0000000000 --- a/tests/lang/037.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -'Static' binding for private variables ---FILE-- -<?php - -class par { - private $id="foo"; - - function displayMe() - { - $this->displayChild(); - } -}; - -class chld extends par { - private $id = "bar"; - - function displayChild() - { - print $this->id; - } -}; - - -$obj = new chld(); -$obj->displayMe(); - -?> ---EXPECT-- -bar diff --git a/tests/lang/bison1.phpt b/tests/lang/bison1.phpt deleted file mode 100644 index 3571576fb8..0000000000 --- a/tests/lang/bison1.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -Bison weirdness ---FILE-- -<?php -error_reporting(E_ALL & ~E_NOTICE); -echo "blah-$foo\n"; -?> ---EXPECT-- -blah- diff --git a/tests/lang/bug17115.phpt b/tests/lang/bug17115.phpt deleted file mode 100644 index 0cb3bf44d2..0000000000 --- a/tests/lang/bug17115.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -Bug #17115 (lambda functions produce segfault with static vars) ---FILE-- -<?php -$func = create_function('',' - static $foo = 0; - return $foo++; -'); -var_dump($func()); -var_dump($func()); -var_dump($func()); -?> ---EXPECT-- -int(0) -int(1) -int(2) diff --git a/tests/lang/bug18872.phpt b/tests/lang/bug18872.phpt deleted file mode 100644 index 2e3dc22c58..0000000000 --- a/tests/lang/bug18872.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Bug #18872 (class constant used as default parameter) ---FILE-- -<?php -class FooBar { - const BIFF = 3; -} - -function foo($biff = FooBar::BIFF) { - echo $biff . "\n"; -} - -foo(); -foo(); -?> ---EXPECT-- -3 -3 diff --git a/tests/lang/bug19566.phpt b/tests/lang/bug19566.phpt deleted file mode 100644 index 45c3bc588e..0000000000 --- a/tests/lang/bug19566.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -Bug #19566 (get_declared_classes() segfaults) ---FILE-- -<?php -class foo {} -$result = get_declared_classes(); -var_dump(array_search('foo', $result)); -?> ---EXPECTF-- -int(%d) diff --git a/tests/lang/bug19943.phpt b/tests/lang/bug19943.phpt deleted file mode 100644 index 3be703fb1d..0000000000 --- a/tests/lang/bug19943.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -Bug #19943 (memleaks) ---FILE-- -<?php - $ar = array(); - for ($count = 0; $count < 10; $count++) { - $ar[$count] = "$count"; - $ar[$count]['idx'] = "$count"; - } - - for ($count = 0; $count < 10; $count++) { - echo $ar[$count]." -- ".$ar[$count]['idx']."\n"; - } - $a = "0123456789"; - $a[9] = $a{0}; - var_dump($a); -?> ---EXPECT-- -0 -- 0 -1 -- 1 -2 -- 2 -3 -- 3 -4 -- 4 -5 -- 5 -6 -- 6 -7 -- 7 -8 -- 8 -9 -- 9 -string(10) "0123456780" diff --git a/tests/lang/bug20175.phpt b/tests/lang/bug20175.phpt deleted file mode 100644 index 55ff7d82b8..0000000000 --- a/tests/lang/bug20175.phpt +++ /dev/null @@ -1,165 +0,0 @@ ---TEST-- -Bug #20175 (Static vars can't store ref to new instance) ---SKIPIF-- -<?php if (version_compare(zend_version(),'2.0.0-dev','<')) die('skip ZE1 does not have static class members'); ?> ---FILE-- -<?php -print zend_version()."\n"; - -/* Part 1: - * Storing the result of a function in a static variable. - * foo_global() increments global variable $foo_count whenever it is executed. - * When foo_static() is called it checks for the static variable $foo_value - * being initialised. In case initialisation is necessary foo_global() will be - * called. Since that must happen only once the return value should be equal. - */ -$foo_count = 0; - -function foo_global() { - global $foo_count; - echo "foo_global()\n"; - return 'foo:' . ++$foo_count; -} - -function foo_static() { - static $foo_value; - echo "foo_static()\n"; - if (!isset($foo_value)) { - $foo_value = foo_global(); - } - return $foo_value; -} - -/* Part 2: - * Storing a reference to the result of a function in a static variable. - * Same as Part 1 but: - * The return statment transports a copy of the value to return. In other - * words the return value of bar_global() is a temporary variable only valid - * after the function call bar_global() is done in current local scope. - */ -$bar_count = 0; - -function bar_global() { - global $bar_count; - echo "bar_global()\n"; - return 'bar:' . ++$bar_count; -} - -function bar_static() { - static $bar_value; - echo "bar_static()\n"; - if (!isset($bar_value)) { - $bar_value = &bar_global(); - } - return $bar_value; -} - -/* Part 3: TO BE DISCUSSED - * - * Storing a reference to the result of a function in a static variable. - * Same as Part 2 but wow_global() returns a reference so $wow_value - * should store a reference to $wow_global. Therefor $wow_value is already - * initialised in second call to wow_static() and hence shouldn't call - * wow_global() again. - */ /* -$wow_count = 0; -$wow_name = ''; - -function &wow_global() { - global $wow_count, $wow_name; - echo "wow_global()\n"; - $wow_name = 'wow:' . ++$wow_count; - return $wow_name; -} - -function wow_static() { - static $wow_value; - echo "wow_static()\n"; - if (!isset($wow_value)) { - $wow_value = &wow_global(); - } - return $wow_value; -}*/ - -/* Part 4: - * Storing a reference to a new instance (that's where the name of the test - * comes from). First there is the global counter $oop_global again which - * counts the calls to the constructor of oop_class and hence counts the - * creation of oop_class instances. - * The class oop_test uses a static reference to a oop_class instance. - * When another oop_test instance is created it must reuse the statically - * stored reference oop_value. This way oop_class gets some singleton behavior - * since it will be created only once for all insatnces of oop_test. - */ -$oop_global = 0; -class oop_class { - var $oop_name; - - function oop_class() { - global $oop_global; - echo "oop_class()\n"; - $this->oop_name = 'oop:' . ++$oop_global; - } -} - -class oop_test { - static $oop_value; - - function oop_test() { - echo "oop_test()\n"; - } - - function oop_static() { - echo "oop_static()\n"; - if (!isset(self::$oop_value)) { - self::$oop_value = & new oop_class; - } - echo self::$oop_value->oop_name; - } -} - -print foo_static()."\n"; -print foo_static()."\n"; -print bar_static()."\n"; -print bar_static()."\n"; -//print wow_static()."\n"; -//print wow_static()."\n"; -echo "wow_static() -wow_global() -wow:1 -wow_static() -wow:1 -"; -$oop_tester = new oop_test; -print $oop_tester->oop_static()."\n"; -print $oop_tester->oop_static()."\n"; -$oop_tester = new oop_test; // repeated. -print $oop_tester->oop_static()."\n"; -?> ---EXPECTF-- -%s -foo_static() -foo_global() -foo:1 -foo_static() -foo:1 -bar_static() -bar_global() -bar:1 -bar_static() -bar_global() -bar:2 -wow_static() -wow_global() -wow:1 -wow_static() -wow:1 -oop_test() -oop_static() -oop_class() -oop:1 -oop_static() -oop:1 -oop_test() -oop_static() -oop:1 diff --git a/tests/lang/bug21094.phpt b/tests/lang/bug21094.phpt deleted file mode 100644 index 266a1d6c8f..0000000000 --- a/tests/lang/bug21094.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -Bug #21094 (set_error_handler not accepting methods) ---FILE-- -<?php -class test { - function hdlr($errno, $errstr, $errfile, $errline) { - printf("[%d] errstr: %s, errfile: %s, errline: %d\n", $errno, $errstr, $errfile, $errline, $errstr); - } -} - -set_error_handler(array(new test(), "hdlr")); - -trigger_error("test"); -?> ---EXPECTF-- -[1024] errstr: test, errfile: %s, errline: %d - diff --git a/tests/lang/bug21600.phpt b/tests/lang/bug21600.phpt deleted file mode 100644 index c3f832b9ea..0000000000 --- a/tests/lang/bug21600.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Bug #21600 (assign by reference function call changes variable contents) ---FILE-- -<?php -$tmp = array(); -$tmp['foo'] = "test"; -$tmp['foo'] = &bar($tmp['foo']); -var_dump($tmp); - -unset($tmp); - -$tmp = array(); -$tmp['foo'] = "test"; -$tmp['foo'] = &fubar($tmp['foo']); -var_dump($tmp); - -function bar($text){ - return $text; -} - -function fubar($text){ - $text = &$text; - return $text; -} -?> ---EXPECT-- -array(1) { - ["foo"]=> - &string(4) "test" -} -array(1) { - ["foo"]=> - string(4) "test" -} diff --git a/tests/lang/bug21669.phpt b/tests/lang/bug21669.phpt deleted file mode 100644 index 643b0695ee..0000000000 --- a/tests/lang/bug21669.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -Bug #21669 ("$obj = new $this->var;" doesn't work) ---FILE-- -<?php -class Test { - function say_hello() { - echo "Hello world"; - } -} - -class Factory { - public $name = "Test"; - function create() { - $obj = new $this->name; /* Parse error */ - return $obj; - } -} -$factory = new Factory; -$test = $factory->create(); -$test->say_hello(); -?> ---EXPECT-- -Hello world diff --git a/tests/lang/bug21800.phpt b/tests/lang/bug21800.phpt deleted file mode 100644 index 72755e29a5..0000000000 --- a/tests/lang/bug21800.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -Bug #21800 (Segfault under interactive mode) ---SKIPIF-- -<?php (PHP_SAPI != 'cli') and print "SKIP PHP binary is not cli"; ?> ---FILE-- -<?php -$exe = getenv('TEST_PHP_EXECUTABLE'); -$fh = popen("$exe -a", 'w'); -if ($fh !== false) { - fwrite($fh, "<?php echo ':test:'; ?>\n\n"); - fclose($fh); -} else { - echo "failure\n"; -} -?> ---EXPECT-- -Interactive mode enabled - -:test: diff --git a/tests/lang/bug21820.phpt b/tests/lang/bug21820.phpt deleted file mode 100644 index 0ca233ea84..0000000000 --- a/tests/lang/bug21820.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -Bug #21820 ("$arr['foo']" generates bogus E_NOTICE, should be E_PARSE) ---FILE-- -<?php - -error_reporting(E_ALL); - -$arr = array('foo' => 'bar'); -echo "$arr['foo']"; - -?> ---EXPECTREGEX-- -Parse error: (parse|syntax) error, .*expecting `?T_STRING'? or `?T_VARIABLE'? or `?T_NUM_STRING'? in .*bug21820.php on line .* diff --git a/tests/lang/bug21849.phpt b/tests/lang/bug21849.phpt deleted file mode 100644 index 30b311320b..0000000000 --- a/tests/lang/bug21849.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -Bug #21849 (self::constant doesn't work as method's default parameter) ---FILE-- -<?php -class foo { - const bar = "fubar\n"; - - function foo($arg = self::bar) { - echo $arg; - } -} - -new foo(); -?> ---EXPECT-- -fubar diff --git a/tests/lang/bug21961.phpt b/tests/lang/bug21961.phpt deleted file mode 100644 index 24581d663e..0000000000 --- a/tests/lang/bug21961.phpt +++ /dev/null @@ -1,58 +0,0 @@ ---TEST-- -Bug #21961 (get_parent_class() segfault) ---SKIPIF-- -<?php if (version_compare(zend_version(),'2.0.0-dev','<')) die('skip prepared for ZE2'); ?> ---FILE-- -<?php - -class man -{ - public $name, $bars; - function man() - { - $this->name = 'Mr. X'; - $this->bars = array(); - } - - function getdrunk($where) - { - $this->bars[] = new bar($where); - } - - function getName() - { - return $this->name; - } -} - -class bar extends man -{ - public $name; - - function bar($w) - { - $this->name = $w; - } - - function getName() - { - return $this->name; - } - - function whosdrunk() - { - $who = get_parent_class($this); - if($who == NULL) - { - return 'nobody'; - } - return eval("return ".$who.'::getName();'); - } -} - -$x = new man; -$x->getdrunk('The old Tavern'); -var_dump($x->bars[0]->whosdrunk()); -?> ---EXPECT-- -string(14) "The old Tavern" diff --git a/tests/lang/bug22231.phpt b/tests/lang/bug22231.phpt deleted file mode 100644 index 84142b01ff..0000000000 --- a/tests/lang/bug22231.phpt +++ /dev/null @@ -1,39 +0,0 @@ ---TEST-- -Bug #22231 (segfault when returning a global variable by reference) ---FILE-- -<?php -class foo { - public $fubar = 'fubar'; -} - -function &foo(){ - $GLOBALS['foo'] = &new foo(); - return $GLOBALS['foo']; -} -$bar = &foo(); -var_dump($bar); -var_dump($bar->fubar); -unset($bar); -$bar = &foo(); -var_dump($bar->fubar); - -$foo = &foo(); -var_dump($foo); -var_dump($foo->fubar); -unset($foo); -$foo = &foo(); -var_dump($foo->fubar); -?> ---EXPECTF-- -object(foo)#%d (1) { - ["fubar"]=> - string(5) "fubar" -} -string(5) "fubar" -string(5) "fubar" -object(foo)#%d (1) { - ["fubar"]=> - string(5) "fubar" -} -string(5) "fubar" -string(5) "fubar" diff --git a/tests/lang/bug22367.phpt b/tests/lang/bug22367.phpt deleted file mode 100644 index d97ad7cef3..0000000000 --- a/tests/lang/bug22367.phpt +++ /dev/null @@ -1,122 +0,0 @@ ---TEST-- -Bug #22367 (weird zval allocation problem) ---FILE-- -<?php -class foo -{ - public $test = array(0, 1, 2, 3, 4); - - function a($arg) { - var_dump(array_key_exists($arg, $this->test)); - return $this->test[$arg]; - } - - function b() { - @$this->c(); - - $zero = $this->test[0]; - $one = $this->test[1]; - $two = $this->test[2]; - $three = $this->test[3]; - $four = $this->test[4]; - return array($zero, $one, $two, $three, $four); - } - - function c() { - return $this->a($this->d()); - } - - function d() {} -} - -class bar extends foo -{ - public $i = 0; - public $idx; - - function bar($idx) { - $this->idx = $idx; - } - - function &a($arg){ - return parent::a($arg); - } - function d(){ - return $this->idx; - } -} - -$a = new bar(5); -var_dump($a->idx); -$a->c(); -$b = $a->b(); -var_dump($b); -var_dump($a->test); - -$a = new bar(2); -var_dump($a->idx); -@$a->c(); -$b = $a->b(); -var_dump($b); -var_dump($a->test); - -?> ---EXPECTF-- -int(5) -bool(false) - -Notice: Undefined offset: %d in %s on line %d - -Strict Standards: Only variable references should be returned by reference in %s on line %d -bool(false) -array(5) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) -} -array(5) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) -} -int(2) -bool(true) -bool(true) -array(5) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) -} -array(5) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) -} diff --git a/tests/lang/bug22510.phpt b/tests/lang/bug22510.phpt deleted file mode 100644 index 474fc9793e..0000000000 --- a/tests/lang/bug22510.phpt +++ /dev/null @@ -1,123 +0,0 @@ ---TEST-- -Bug #22510 (segfault among complex references) ---FILE-- -<?php -class foo -{ - public $list = array(); - - function finalize() { - print __CLASS__."::".__FUNCTION__."\n"; - $cl = &$this->list; - } - - function &method1() { - print __CLASS__."::".__FUNCTION__."\n"; - return @$this->foo; - } - - function &method2() { - print __CLASS__."::".__FUNCTION__."\n"; - return $this->foo; - } - - function method3() { - print __CLASS__."::".__FUNCTION__."\n"; - return @$this->foo; - } -} - -class bar -{ - function run1() { - print __CLASS__."::".__FUNCTION__."\n"; - $this->instance = new foo(); - $this->instance->method1($this); - $this->instance->method1($this); - } - - function run2() { - print __CLASS__."::".__FUNCTION__."\n"; - $this->instance = new foo(); - $this->instance->method2($this); - $this->instance->method2($this); - } - - function run3() { - print __CLASS__."::".__FUNCTION__."\n"; - $this->instance = new foo(); - $this->instance->method3($this); - $this->instance->method3($this); - } -} - -function ouch(&$bar) { - print __FUNCTION__."\n"; - @$a = $a; - $bar->run1(); -} - -function ok1(&$bar) { - print __FUNCTION__."\n"; - $bar->run1(); -} - -function ok2(&$bar) { - print __FUNCTION__."\n"; - @$a = $a; - $bar->run2(); -} - -function ok3(&$bar) { - print __FUNCTION__."\n"; - @$a = $a; - $bar->run3(); -} - -$bar = &new bar(); -ok1($bar); -$bar->instance->finalize(); -print "done!\n"; -ok2($bar); -$bar->instance->finalize(); -print "done!\n"; -ok3($bar); -$bar->instance->finalize(); -print "done!\n"; -ouch($bar); -$bar->instance->finalize(); -print "I'm alive!\n"; -?> ---EXPECTF-- -ok1 -bar::run1 -foo::method1 - -Strict Standards: Only variable references should be returned by reference in %s on line %d -foo::method1 - -Strict Standards: Only variable references should be returned by reference in %s on line %d -foo::finalize -done! -ok2 -bar::run2 -foo::method2 -foo::method2 -foo::finalize -done! -ok3 -bar::run3 -foo::method3 -foo::method3 -foo::finalize -done! -ouch -bar::run1 -foo::method1 - -Strict Standards: Only variable references should be returned by reference in %s on line %d -foo::method1 - -Strict Standards: Only variable references should be returned by reference in %s on line %d -foo::finalize -I'm alive! diff --git a/tests/lang/bug22592.phpt b/tests/lang/bug22592.phpt deleted file mode 100644 index e4e68b1184..0000000000 --- a/tests/lang/bug22592.phpt +++ /dev/null @@ -1,53 +0,0 @@ ---TEST-- -Bug #22592 (cascading assignments to strings with curly braces broken) ---FILE-- -<?php -function error_hdlr($errno, $errstr) { - echo "[$errstr]\n"; -} - -set_error_handler('error_hdlr'); - -$i = 4; -$s = "string"; - -$result = "* *-*"; -var_dump($result); -$result{6} = '*'; -var_dump($result); -$result{1} = $i; -var_dump($result); -$result{3} = $s; -var_dump($result); -$result{7} = 0; -var_dump($result); -$a = $result{1} = $result{3} = '-'; -var_dump($result); -$b = $result{3} = $result{5} = $s; -var_dump($result); -$c = $result{0} = $result{2} = $result{4} = $i; -var_dump($result); -$d = $result{6} = $result{8} = 5; -var_dump($result); -$e = $result{1} = $result{6}; -var_dump($result); -var_dump($a, $b, $c, $d, $e); -$result{-1} = 'a'; -?> ---EXPECT-- -string(5) "* *-*" -string(7) "* *-* *" -string(7) "*4*-* *" -string(7) "*4*s* *" -string(8) "*4*s* *0" -string(8) "*-*-* *0" -string(8) "*-*s*s*0" -string(8) "4-4s4s*0" -string(9) "4-4s4s505" -string(9) "454s4s505" -string(1) "-" -string(6) "string" -int(4) -int(5) -string(1) "5" -[Illegal string offset: -1] diff --git a/tests/lang/bug22690.phpt b/tests/lang/bug22690.phpt deleted file mode 100644 index 6aed5be6e9..0000000000 --- a/tests/lang/bug22690.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Bug #22690 (ob_start() is broken with create_function() callbacks) ---FILE-- -<?php - $foo = create_function('$s', 'return strtoupper($s);'); - ob_start($foo); - echo $foo("bar\n"); -?> -bar ---EXPECT-- -BAR -BAR diff --git a/tests/lang/bug23279.phpt b/tests/lang/bug23279.phpt deleted file mode 100644 index 78d7850ff4..0000000000 --- a/tests/lang/bug23279.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -Bug #23279 (exception handler stops after first function call) ---FILE-- -<?php -ob_start(); -set_exception_handler('redirect_on_error'); -echo "Hello World\n"; -throw new Exception; - -function redirect_on_error($e) { - ob_end_clean(); - echo "Goodbye Cruel World\n"; -} -?> ---EXPECT-- -Goodbye Cruel World diff --git a/tests/lang/bug23384.phpt b/tests/lang/bug23384.phpt deleted file mode 100644 index f48d89a3b0..0000000000 --- a/tests/lang/bug23384.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -Bug #23384 (use of class constants in statics) ---INI-- -error_reporting=4095 ---FILE-- -<?php -define('TEN', 10); -class Foo { - const HUN = 100; - function test($x = Foo::HUN) { - static $arr2 = array(TEN => 'ten'); - static $arr = array(Foo::HUN => 'ten'); - - print_r($arr); - print_r($arr2); - print_r($x); - } -} - -Foo::test(); -echo Foo::HUN."\n"; -?> ---EXPECTF-- -Strict Standards: Non-static method Foo::test() cannot be called statically in %sbug23384.php on line %d -Array -( - [100] => ten -) -Array -( - [10] => ten -) -100100 diff --git a/tests/lang/bug23489.phpt b/tests/lang/bug23489.phpt deleted file mode 100644 index 645bb1b7df..0000000000 --- a/tests/lang/bug23489.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -Bug #23489 (ob_start() is broken with method callbacks) ---FILE-- -<?php -class Test { - function Test() { - ob_start( - array( - $this, 'transform' - ) - ); - } - - function transform($buffer) { - return 'success'; - } -} - -$t = new Test; -?> -failure ---EXPECT-- -success diff --git a/tests/lang/bug23524.phpt b/tests/lang/bug23524.phpt deleted file mode 100755 index 18ffc33a48..0000000000 --- a/tests/lang/bug23524.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -Bug #23524 Improper handling of constants in array indeces ---FILE-- -<?php - echo "Begin\n"; - define("THE_CONST",123); - function f($a=array(THE_CONST=>THE_CONST)) { - print_r($a); - } - f(); - f(); - f(); - echo "Done"; -?> ---EXPECT-- -Begin -Array -( - [123] => 123 -) -Array -( - [123] => 123 -) -Array -( - [123] => 123 -) -Done diff --git a/tests/lang/bug23584.phpt b/tests/lang/bug23584.phpt deleted file mode 100644 index 417cfb0856..0000000000 --- a/tests/lang/bug23584.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -Bug #23584 (error line numbers off by one when using #!php) ---FILE-- -#!php -<?php - -error_reporting(E_ALL); - -echo $foo; - -?> ---EXPECTREGEX-- -Notice: Undefined variable:.*foo in .* on line 6 diff --git a/tests/lang/bug23624.phpt b/tests/lang/bug23624.phpt deleted file mode 100644 index 4ddb82e8c6..0000000000 --- a/tests/lang/bug23624.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Bug #23624 (foreach leaves current array key as null) ---FILE-- -<?php - $arr = array ('one', 'two', 'three'); - var_dump(current($arr)); - foreach($arr as $key => $value); - var_dump(current($arr)); -?> ---EXPECT-- -string(3) "one" -bool(false) diff --git a/tests/lang/bug23922.phpt b/tests/lang/bug23922.phpt deleted file mode 100644 index 1fc6e548ff..0000000000 --- a/tests/lang/bug23922.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -Bug #23922 (scope doesn't properly propagate into internal functions) ---FILE-- -<?php - class foo - { - public $foo = 1; - - function as_string() - { assert('$this->foo == 1'); } - - function as_expr() - { assert($this->foo == 1); } - } - - $foo = new foo(); - $foo->as_expr(); - $foo->as_string(); -?> ---EXPECT-- diff --git a/tests/lang/bug24054.phpt b/tests/lang/bug24054.phpt deleted file mode 100644 index fc51c83d77..0000000000 --- a/tests/lang/bug24054.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Bug #24054 (Assignment operator *= broken) ---FILE-- -<?php // $Id$ - -define('LONG_MAX', is_int(5000000000)? 9223372036854775807 : 0x7FFFFFFF); -define('LONG_MIN', -LONG_MAX - 1); -printf("%d,%d,%d,%d\n",is_int(LONG_MIN ),is_int(LONG_MAX ), - is_int(LONG_MIN-1),is_int(LONG_MAX+1)); - - $i = LONG_MAX; - - $j = $i * 1001; - $i *= 1001; - -$tests = <<<TESTS -$i === $j -TESTS; - -include(dirname(__FILE__) . '/../quicktester.inc'); - ---EXPECT-- -1,1,0,0 -OK diff --git a/tests/lang/bug24396.phpt b/tests/lang/bug24396.phpt deleted file mode 100644 index b78e4b8757..0000000000 --- a/tests/lang/bug24396.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -Bug #24396 (global $$variable broken) ---FILE-- -<?php - -$arr = array('a' => 1, 'b' => 2, 'c' => 3); - -foreach($arr as $k=>$v) { - global $$k; // comment this out and it works in PHP 5 too.. - - echo "($k => $v)\n"; - - $$k = $v; -} -?> ---EXPECT-- -(a => 1) -(b => 2) -(c => 3) diff --git a/tests/lang/bug24403.phpt b/tests/lang/bug24403.phpt deleted file mode 100644 index fe99257d3d..0000000000 --- a/tests/lang/bug24403.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -Bug #24403 (scope doesn't properly propagate into internal functions) ---FILE-- -<?php -class a -{ - public $a = array(); - - function a() - { - $output = preg_replace( - '!\{\s*([a-z0-9_]+)\s*\}!sie', - "(in_array('\\1',\$this->a) ? '\'.\$p[\'\\1\'].\'' : -'\'.\$r[\'\\1\'].\'')", - "{a} b {c}"); - } -} -new a(); -?> ---EXPECT-- diff --git a/tests/lang/bug24436.phpt b/tests/lang/bug24436.phpt deleted file mode 100644 index b0cfbe0931..0000000000 --- a/tests/lang/bug24436.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Bug #24436 (isset() and empty() produce errors with non-existent variables in objects) ---FILE-- -<?php -class test { - function __construct() { - if (empty($this->test[0][0])) { print "test1";} - if (!isset($this->test[0][0])) { print "test2";} - } -} - -$test1 = new test(); -?> ---EXPECT-- -test1test2 diff --git a/tests/lang/bug24499.phpt b/tests/lang/bug24499.phpt deleted file mode 100755 index 6ce56dbad7..0000000000 --- a/tests/lang/bug24499.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Bug #24499 (bogus handling of a public property as a private one) ---FILE-- -<?php -class Id { - private $id="priv"; - - public function tester($obj) - { - $obj->id = "bar"; - } -} - -$id = new Id(); -@$obj->foo = "bar"; -$id->tester($obj); -print_r($obj); -?> ---EXPECT-- -stdClass Object -( - [foo] => bar - [id] => bar -) diff --git a/tests/lang/bug24573.phpt b/tests/lang/bug24573.phpt deleted file mode 100644 index a7c8ac5ca5..0000000000 --- a/tests/lang/bug24573.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -Bug #24573 (debug_backtrace() crashes if $this is set to null) ---FILE-- -<?php - -class Foo { - function Bar() { - $__this = $this; - $this = null; - debug_backtrace(); - $this = $__this; - } -} - -$f = new Foo; - -$f->Bar(); - -echo "OK\n"; - -?> ---EXPECT-- -OK diff --git a/tests/lang/bug24640.phpt b/tests/lang/bug24640.phpt deleted file mode 100755 index 3cd3c4a595..0000000000 --- a/tests/lang/bug24640.phpt +++ /dev/null @@ -1,63 +0,0 @@ ---TEST-- -Bug #24640 (var_export and var_dump can't output large float) ---FILE-- -<?php -function test($v) -{ - echo var_export($v, true) . "\n"; - var_dump($v); - echo "$v\n"; - print_r($v); - echo "\n------\n"; -} - -test(1.7e+300); -test(1.7e-300); -test(1.7e+79); -test(1.7e-79); -test(1.7e+80); -test(1.7e-80); -test(1.7e+81); -test(1.7e-81); -?> ---EXPECT-- -1.7E+300 -float(1.7E+300) -1.7E+300 -1.7E+300 ------- -1.7E-300 -float(1.7E-300) -1.7E-300 -1.7E-300 ------- -1.7E+79 -float(1.7E+79) -1.7E+79 -1.7E+79 ------- -1.7E-79 -float(1.7E-79) -1.7E-79 -1.7E-79 ------- -1.7E+80 -float(1.7E+80) -1.7E+80 -1.7E+80 ------- -1.7E-80 -float(1.7E-80) -1.7E-80 -1.7E-80 ------- -1.7E+81 -float(1.7E+81) -1.7E+81 -1.7E+81 ------- -1.7E-81 -float(1.7E-81) -1.7E-81 -1.7E-81 ------- diff --git a/tests/lang/bug24652.phpt b/tests/lang/bug24652.phpt deleted file mode 100755 index 3bcea0e1d2..0000000000 --- a/tests/lang/bug24652.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Bug #24652 (broken array_flip()) ---FILE-- -<?php - /* This works */ - $f = array('7' => 0); - var_dump($f); - var_dump(array_key_exists(7, $f)); - var_dump(array_key_exists('7', $f)); - - print "----------\n"; - /* This doesn't */ - $f = array_flip(array('7')); - var_dump($f); - var_dump(array_key_exists(7, $f)); - var_dump(array_key_exists('7', $f)); -?> ---EXPECT-- -array(1) { - [7]=> - int(0) -} -bool(true) -bool(true) ----------- -array(1) { - [7]=> - int(0) -} -bool(true) -bool(true) diff --git a/tests/lang/bug24658.phpt b/tests/lang/bug24658.phpt deleted file mode 100644 index 399fd32cac..0000000000 --- a/tests/lang/bug24658.phpt +++ /dev/null @@ -1,56 +0,0 @@ ---TEST-- -Bug #24658 (combo of typehint / reference causes crash) ---FILE-- -<?php -class foo {} -function no_typehint($a) { - var_dump($a); -} -function typehint(foo $a) { - var_dump($a); -} -function no_typehint_ref(&$a) { - var_dump($a); -} -function typehint_ref(foo &$a) { - var_dump($a); -} -$v = new foo(); -$a = array(new foo(), 1, 2); -no_typehint($v); -typehint($v); -no_typehint_ref($v); -typehint_ref($v); -echo "===no_typehint===\n"; -array_walk($a, 'no_typehint'); -echo "===no_typehint_ref===\n"; -array_walk($a, 'no_typehint_ref'); -echo "===typehint===\n"; -array_walk($a, 'typehint'); -echo "===typehint_ref===\n"; -array_walk($a, 'typehint_ref'); -?> ---EXPECTF-- -object(foo)#%d (0) { -} -object(foo)#%d (0) { -} -object(foo)#%d (0) { -} -object(foo)#%d (0) { -} -===no_typehint=== -object(foo)#%d (0) { -} -int(1) -int(2) -===no_typehint_ref=== -object(foo)#%d (0) { -} -int(1) -int(2) -===typehint=== -object(foo)#%d (0) { -} - -Fatal error: Argument 1 must be an object of class foo in %s on line %d diff --git a/tests/lang/bug24783.phpt b/tests/lang/bug24783.phpt deleted file mode 100644 index 8c8cd6ee01..0000000000 --- a/tests/lang/bug24783.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -Bug #24783 ($key not binary safe in "foreach($arr as $key => $val)") ---FILE-- -<?php -error_reporting(E_ALL); - $arr = array ("foo\0bar" => "foo\0bar"); - foreach ($arr as $key => $val) { - echo strlen($key), ': '; - echo urlencode($key), ' => ', urlencode($val), "\n"; - } -?> ---EXPECT-- -7: foo%00bar => foo%00bar diff --git a/tests/lang/bug24908.phpt b/tests/lang/bug24908.phpt deleted file mode 100755 index 30056abf3c..0000000000 --- a/tests/lang/bug24908.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Bug #24908 (super-globals can not be used in __destruct()) ---INI-- -variables_order=GPS ---FILE-- -<?php -class test { - function __construct() { - if (count($_SERVER)) echo "O"; - } - function __destruct() { - if (count($_SERVER)) echo "K\n"; - } -} -$test = new test(); -?> ---EXPECT-- -OK diff --git a/tests/lang/bug24926.phpt b/tests/lang/bug24926.phpt deleted file mode 100644 index 3d2cc7008b..0000000000 --- a/tests/lang/bug24926.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Bug #24926 (lambda function (create_function()) cannot be stored in a class property) ---FILE-- -<?php - -error_reporting (E_ALL); - -class foo { - - public $functions = array(); - - function foo() - { - $function = create_function('', 'return "FOO\n";'); - print($function()); - - $this->functions['test'] = $function; - print($this->functions['test']()); // werkt al niet meer - - } -} - -$a = new foo (); - -?> ---EXPECT-- -FOO -FOO diff --git a/tests/lang/bug24951.phpt b/tests/lang/bug24951.phpt deleted file mode 100644 index aa48ab2936..0000000000 --- a/tests/lang/bug24951.phpt +++ /dev/null @@ -1,42 +0,0 @@ ---TEST-- -Bug #24951 (ob_flush() destroys output handler) ---FILE-- -<?php -function test($s, $mode) -{ - return (($mode & PHP_OUTPUT_HANDLER_START)?"[":"") . $s . (($mode & PHP_OUTPUT_HANDLER_END)?"]\n":""); -} -function t1() -{ - ob_start("test"); - echo "Hello from t1 1 "; - echo "Hello from t1 2 "; - ob_end_flush(); -} -function t2() -{ - ob_start("test"); - echo "Hello from t2 1 "; - ob_flush(); - echo "Hello from t2 2 "; - ob_end_flush(); -} -function t3() -{ - ob_start("test"); - echo "Hello from t3 1 "; - ob_clean(); - echo "Hello from t3 2 "; - ob_end_flush(); -} - -t1(); echo "\n"; -t2(); echo "\n"; -t3(); echo "\n"; -?> ---EXPECT-- -[Hello from t1 1 Hello from t1 2 ] - -[Hello from t2 1 Hello from t2 2 ] - -Hello from t3 2 ] diff --git a/tests/lang/bug25145.phpt b/tests/lang/bug25145.phpt deleted file mode 100755 index e33580ab0d..0000000000 --- a/tests/lang/bug25145.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -Bug #25145 (SEGV on recpt of form input with name like "123[]") ---SKIPIF-- -<?php if (php_sapi_name() == 'cli') echo 'skip'; ?> ---GET-- -123[]=SEGV ---FILE-- -<?php - -var_dump($_REQUEST); -echo "Done\n"; - -?> ---EXPECT-- -array(1) { - [123]=> - array(1) { - [0]=> - string(4) "SEGV" - } -} -Done diff --git a/tests/lang/bug25547.phpt b/tests/lang/bug25547.phpt deleted file mode 100755 index cce556ceb9..0000000000 --- a/tests/lang/bug25547.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -Bug #25547 (error_handler and array index with function call) ---FILE-- -<?php - -function handler($errno, $errstr, $errfile, $errline, $context) -{ - echo __FUNCTION__ . "($errstr)\n"; -} - -set_error_handler('handler'); - -function foo($x) { - return "foo"; -} - -$output = array(); -++$output[foo("bar")]; - -print_r($output); - -echo "Done"; -?> ---EXPECT-- -handler(Undefined index: foo) -Array -( - [foo] => 1 -) -Done diff --git a/tests/lang/bug25652.phpt b/tests/lang/bug25652.phpt deleted file mode 100755 index 09cfc18197..0000000000 --- a/tests/lang/bug25652.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -Bug #25652 (Calling Global functions dynamically fails from Class scope) ---FILE-- -<?php - - function testfunc ($var) { - echo "testfunc $var\n"; - } - - class foo { - public $arr = array('testfunc'); - function bar () { - $this->arr[0]('testvalue'); - } - } - - $a = new foo (); - $a->bar (); - -?> ---EXPECT-- -testfunc testvalue diff --git a/tests/lang/bug25922.phpt b/tests/lang/bug25922.phpt deleted file mode 100755 index 0588eef949..0000000000 --- a/tests/lang/bug25922.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -Bug #25922 (SEGV in error_handler when context is destroyed) ---INI-- -error_reporting=2047 ---FILE-- -<?php -function my_error_handler($error, $errmsg='', $errfile='', $errline=0, $errcontext='') -{ - $errcontext = ''; -} - -set_error_handler('my_error_handler'); - -function test() -{ - echo "Undefined index here: '{$data['HTTP_HEADER']}'\n"; -} -test(); -?> ---EXPECT-- -Undefined index here: '' diff --git a/tests/lang/bug26182.phpt b/tests/lang/bug26182.phpt deleted file mode 100644 index 7417293928..0000000000 --- a/tests/lang/bug26182.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -Bug #26182 (Object properties created redundantly) ---INI-- -error_reporting=4095 ---FILE-- -<?php - -class A { - function NotAConstructor () - { - if (isset($this->x)) { - //just for demo - } - } -} - -$t = new A (); - -print_r($t); - -?> ---EXPECT-- -A Object -( -) diff --git a/tests/lang/bug26696.phpt b/tests/lang/bug26696.phpt deleted file mode 100644 index e51978b3d2..0000000000 --- a/tests/lang/bug26696.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Bug #26696 (string index in a switch() crashes with multiple matches) ---FILE-- -<?php - -$str = 'asdd/?'; -$len = strlen($str); -for ($i = 0; $i < $len; $i++) { - switch ($str{$i}) { - case '?': - echo "OK\n"; - break; - } -} - -$str = '*'; -switch ($str{0}) { - case '*'; - echo "OK\n"; - break; - default: - echo 'Default RAN!'; -} - -?> ---EXPECT-- -OK -OK diff --git a/tests/lang/bug26869.phpt b/tests/lang/bug26869.phpt deleted file mode 100644 index 77dd2592ed..0000000000 --- a/tests/lang/bug26869.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Bug #26869 (constant as the key of static array) ---FILE-- -<?php - define("A", "1"); - static $a=array(A => 1); - var_dump($a); - var_dump(isset($a[A])); -?> ---EXPECT-- -array(1) { - [1]=> - int(1) -} -bool(true) diff --git a/tests/lang/bug7515.phpt b/tests/lang/bug7515.phpt deleted file mode 100644 index b33ae24c89..0000000000 --- a/tests/lang/bug7515.phpt +++ /dev/null @@ -1,36 +0,0 @@ ---TEST-- -Bug #7515 (weird & invisible referencing of objects) ---SKIPIF-- -<?php if(version_compare(zend_version(), "2.0.0-dev", '<')) echo "skip Zend Engine 2 needed\n"; ?> ---INI-- -error_reporting=2039 ---FILE-- -<?php -class obj { - function method() {} -} - -$o->root=new obj(); - -ob_start(); -var_dump($o); -$x=ob_get_contents(); -ob_end_clean(); - -$o->root->method(); - -ob_start(); -var_dump($o); -$y=ob_get_contents(); -ob_end_clean(); -if ($x == $y) { - print "success"; -} else { - print "failure -x=$x -y=$y -"; -} -?> ---EXPECT-- -success diff --git a/tests/lang/each_binary_safety.phpt b/tests/lang/each_binary_safety.phpt deleted file mode 100644 index bb13534546..0000000000 --- a/tests/lang/each_binary_safety.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -Binary safety of each() for both keys and values ---FILE-- -<?php -error_reporting(E_ALL); -$arr = array ("foo\0bar" => "foo\0bar"); -while (list($key, $val) = each($arr)) { - echo strlen($key), ': '; - echo urlencode($key), ' => ', urlencode($val), "\n"; -} -?> ---EXPECT-- -7: foo%00bar => foo%00bar diff --git a/tests/lang/error_2_exception_001.phpt b/tests/lang/error_2_exception_001.phpt deleted file mode 100644 index e3d1217f42..0000000000 --- a/tests/lang/error_2_exception_001.phpt +++ /dev/null @@ -1,45 +0,0 @@ ---TEST-- -ZE2 errors caught as exceptions ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class MyException { - function MyException($_errno, $_errmsg) { - $this->errno = $_errno; - $this->errmsg = $_errmsg; - } - - function getErrno() { - return $this->errno; - } - - function getErrmsg() { - return $this->errmsg; - } -} - -function ErrorsToExceptions($errno, $errmsg) { - throw new MyException($errno, $errmsg); -} - -set_error_handler("ErrorsToExceptions"); - -// make sure it isn't catching exceptions that weren't -// thrown... - -try { -} catch (MyException $exception) { - echo "There was an exception: " . $exception->getErrno() . ", '" . $exception->getErrmsg() . "'\n"; -} - -try { - trigger_error("I will become an exception", E_USER_ERROR); -} catch (MyException $exception) { - echo "There was an exception: " . $exception->getErrno() . ", '" . $exception->getErrmsg() . "'\n"; -} - -?> ---EXPECT-- -There was an exception: 256, 'I will become an exception' diff --git a/tests/lang/foreach_with_references_001.phpt b/tests/lang/foreach_with_references_001.phpt deleted file mode 100644 index eb52bb8c10..0000000000 --- a/tests/lang/foreach_with_references_001.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -foreach() with references ---FILE-- -<?php - -$arr = array(1 => "one", 2 => "two", 3 => "three"); - -foreach($arr as $key => $val) { - $val = $key; -} - -print_r($arr); - -foreach($arr as $key => &$val) { - $val = $key; -} - -print_r($arr); - ---EXPECT-- -Array -( - [1] => one - [2] => two - [3] => three -) -Array -( - [1] => 1 - [2] => 2 - [3] => 3 -) diff --git a/tests/lang/type_hints_001.phpt b/tests/lang/type_hints_001.phpt deleted file mode 100644 index 99b7fac0eb..0000000000 --- a/tests/lang/type_hints_001.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -ZE2 type hinting ---SKIPIF-- -<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ---FILE-- -<?php - -class Foo { -} - -class Bar { -} - -function type_hint_foo(Foo $a) { -} - -$foo = new Foo; -$bar = new Bar; - -type_hint_foo($foo); -type_hint_foo($bar); - -?> ---EXPECTF-- - -Fatal error: Argument 1 must be an instance of Foo in %s on line %d diff --git a/tests/odbc-display.php b/tests/odbc-display.php deleted file mode 100644 index f79a854aea..0000000000 --- a/tests/odbc-display.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - if(($conn = odbc_connect($dsn, $dbuser, $dbpwd))){ - if(($res = odbc_do($conn, "select gif from php_test where id='$id'"))){ - odbc_binmode($res, 0); - odbc_longreadlen($res, 0); - if(odbc_fetch_row($res)){ - header("content-type: image/gif"); - odbc_result($res, 1); - exit; - }else{ - echo "Error in odbc_fetch_row"; - } - } else { - echo "Error in odbc_do"; - } - } else { - echo "Error in odbc_connect"; - } -?> diff --git a/tests/odbc-t1.php b/tests/odbc-t1.php deleted file mode 100644 index 90cb97910f..0000000000 --- a/tests/odbc-t1.php +++ /dev/null @@ -1,38 +0,0 @@ -<HTML> -<HEAD> -<TITLE>Quick & dirty ODBC test</TITLE> -</HEAD> -<BODY> -<H1>ODBC Test 1 - Connection</H1> -<?php - if(isset($dbuser)){ - echo "Connecting to $dsn as $dbuser\n<P>"; - $conn = odbc_connect($dsn,$dbuser,$dbpwd); - if(!$conn){ -?> -<H2>Error connecting to database! Check DSN, username and password</H2> -<?php - }else{ -?> -<H2>Connection successful</H2> -<A HREF="odbc-t2.php<?php echo "?dbuser=$dbuser&dsn=$dsn&dbpwd=$dbpwd" ?>">Proceed to next test</A> -| <A HREF="<?php echo $PHP_SELF ?>">Change login information</A> -<?php - } -} else { -?> -<EM>You will need permisson to create tables for the following tests!</EM> -<form action=odbc-t1.php method=post> -<table border=0> -<tr><td>Database (DSN): </td><td><input type=text name=dsn></td></tr> -<tr><td>User: </td><td><input type=text name=dbuser></td></tr> -<tr><td>Password: </td><td><input type=password name=dbpwd></td></tr> -</table> -<br> -<input type=submit value=connect> - -</form> -<?php -} ?> -</BODY> -</HTML> diff --git a/tests/odbc-t2.php b/tests/odbc-t2.php deleted file mode 100644 index a500b09e8b..0000000000 --- a/tests/odbc-t2.php +++ /dev/null @@ -1,82 +0,0 @@ -<HTML> -<HEAD> -<TITLE>Quick & dirty ODBC test #2</TITLE> -</HEAD> -<BODY> -<H1>ODBC Test 2 - Create table</H1> -<?php - if(isset($dbuser)){ - echo "Connecting to $dsn as $dbuser\n"; - $conn = odbc_connect($dsn,$dbuser,$dbpwd); - if(!$conn){ -?> -<H2>Error connecting to database! Check DSN, username and password</H2> -<?php - }else{ -?> -- OK<p> -Dropping table "php3_test" -<?php - Error_Reporting(0); - $res = odbc_exec($conn,"drop table php_test"); - if($res){ - odbc_free_result($res); - } -?> -- OK<p> -Create table "php_test" -<?php - error_reporting(1); - $res = odbc_exec($conn, 'create table php_test (a char(16), b integer, c float, d varchar(128))'); - if($res){ - odbc_free_result($res); -?> - - OK<p> -Table Info:<br> -<table> - <tr> - <th>Name</th> - <th>Type</th> - <th>Length</th> - </tr> -<?php - $info = odbc_exec($conn,"select * from php_test"); - $numfields = odbc_num_fields($info); - - for($i=1; $i<=$numfields; $i++){ -?> - <tr> - <td><?php echo odbc_field_name($info, $i) ?></td> - <td><?php echo odbc_field_type($info, $i) ?></td> - <td><?php echo odbc_field_len($info,$i) ?></td> - </tr> -<?php - } -?> -</table> -<P> -<HR width=50%"> -<P> -<A HREF="odbc-t3.php<?php echo "?dbuser=$dbuser&dsn=$dsn&dbpwd=$dbpwd" ?>">Proceed to next test</A> -| <A HREF="<?php echo $PHP_SELF; ?>">Change login information</A> - -<?php - } - } - } else { -?> - -<form action="odbc-t3.php" method=post> -<table border=0> -<tr><td>Database (DSN): </td><td><input type=text name=dsn></td></tr> -<tr><td>User: </td><td><input type=text name=dbuser></td></tr> -<tr><td>Password: </td><td><input type=password name=dbpwd></td></tr> -</table> -<input type=submit value="Continue"> -</form> - -<?php - } -?> -</BODY> -</HTML> diff --git a/tests/odbc-t3.php b/tests/odbc-t3.php deleted file mode 100644 index edfdc658f8..0000000000 --- a/tests/odbc-t3.php +++ /dev/null @@ -1,95 +0,0 @@ -<HTML> -<HEAD> -<TITLE>Database test #3</TITLE> -</HEAD> -<BODY> -<H1>ODBC Test 3 - Insert records</H1> -<?php - if(isset($dbuser)){ - echo "Connecting to $dsn as $dbuser\n"; - $conn = odbc_connect($dsn,$dbuser,$dbpwd); - if(!$conn){ -?> -<H2>Error connecting to database! Check DSN, username and password</H2> -<?php - }else{ -?> - - OK<p> -Clearing table "php_test" -<?php - error_reporting(0); - $res=odbc_exec($conn,"delete from php_test"); - odbc_free_result($res); - error_reporting(1); -?> - - OK<p> -Inserting into table "php_test" -<?php - $sqlfloat = '00.0'; - $sqlint = 1000; - $stmt = odbc_prepare($conn, "insert into php_test values(?,?,?,?)"); - for($i=1; $i<=5; $i++){ - $values[0] = "test-$i"; - $values[1] = $sqlint + $i; - $values[2] = $i . $sqlfloat . $i; - $values[3] = "php - values $i"; - $ret = odbc_execute($stmt, &$values); - } - odbc_free_result($stmt); - $res = odbc_exec($conn, "select count(*) from php_test"); - if($res && (odbc_result($res, 1) == 5)){ - odbc_free_result($res); -?> - - OK<p> -<H3>The table "php_test" should now contain the following values:</H3> -<table> - <tr> - <th>A</th><th>B</th><th>C</th><th>D</th> - </tr> - <tr> - <td>test-1</td><td>1001</td><td>100.01</td><td>php - values 1</td> - </tr> - <tr> - <td>test-2</td><td>1002</td><td>200.02</td><td>php - values 2</td> - </tr> - <tr> - <td>test-3</td><td>1003</td><td>300.03</td><td>php - values 3</td> - </tr> - <tr> - <td>test-4</td><td>1004</td><td>400.04</td><td>php - values 4</td> - </tr> - <tr> - <td>test-5</td><td>1005</td><td>500.05</td><td>php - values 5</td> - </tr> -</table> - -<H3>Actual contents of table "php_test":</H3> -<?php - $res = odbc_exec($conn, "select * from php_test"); - odbc_result_all($res); - } -?> -<p> - <HR width="50%"> -<p> -<A HREF="odbc-t4.php?dbuser=<?php echo "$dbuser&dsn=$dsn&dbpwd=$dbpwd" ?>">Proceed to next test</A> -| <A HREF="<?php echo $PHP_SELF ?>">Change login information</A> -<?php - } - } else { -?> -<form action=odbc-t3.php method=post> -<table border=0> - <tr><td>Database: </td><td><input type=text name=dsn></td></tr> - <tr><td>User: </td><td><input type=text name=dbuser></td></tr> - <tr><td>Password: </td><td><input type=password name=dbpwd></td></tr> -</table> -<input type=submit value=connect> - -</form> -<?php - } -?> -</BODY> -</HTML> - diff --git a/tests/odbc-t4.php b/tests/odbc-t4.php deleted file mode 100644 index 10e8f4b2d9..0000000000 --- a/tests/odbc-t4.php +++ /dev/null @@ -1,91 +0,0 @@ -<HTML> -<HEAD> -<TITLE>Database test #4</TITLE> -</HEAD> -<BODY> -<H1>ODBC Test 4 - Cursors</H1> -<em>The following test requires your ODBC driver to support positioned updates</em><p> -<?php - if(isset($dbuser)){ - echo "Connecting to $dsn as $dbuser\n"; - $conn = odbc_connect($dsn,$dbuser,$dbpwd); - if(!$conn){ -?> -<H2>Error connecting to database! Check DSN, username and password</H2> -<?php - }else{ -?> - - OK<p> -Updating table "php_test" -<?php - odbc_autocommit($conn, 0); - if(($result = odbc_do($conn, 'select * from php_test where b>1002 for update'))){ - $cursor = odbc_cursor($result); - if(($upd = odbc_prepare($conn,"update php_test set a=?, b=? where current of $cursor"))){ - while(odbc_fetch_row($result)) { - $params[0] = odbc_result($result, 1) . "(*)"; - $params[1] = odbc_result($result, 2) + 2000; - odbc_execute($upd, $params); - } - odbc_commit($conn); - } - } - if($result && $upd){ -?> - - OK<p> -<H3>The table "php_test" should now contain the following values:</H3> -<table> - <tr> - <th>A</th><th>B</th><th>C</th><th>D</th> - </tr> - <tr> - <td>test-1</td><td>1001</td><td>100.01</td><td>php3 - values 1</td> - </tr> - <tr> - <td>test-2</td><td>1002</td><td>200.02</td><td>php - values 2</td> - </tr> - <tr> - <td>test-3(*)</td><td>3003</td><td>300.03</td><td>php - values 3</td> - </tr> - <tr> - <td>test-4(*)</td><td>3004</td><td>400.04</td><td>php - values 4</td> - </tr> - <tr> - <td>test-5(*)</td><td>3005</td><td>500.05</td><td>php - values 5</td> - </tr> - <tr> - <td colspan=4> - <small><em><strong>Note:</strong> If you reload this testpage,<br> - the three last rows will contain different<br>values in columns A and B</em></small> - </td> - </tr> -</table> - -<H3>Actual contents of table "php_test":</H3> -<?php - $res = odbc_exec($conn,"select * from php_test"); - odbc_result_all($res); - }else{ - echo "Your driver obviously doesn't support positioned updates\n<p>"; - } -?> -<p><HR width="50%"><p> -<A HREF="odbc-t5.php?dbuser=<?php echo "$dbuser&dsn=$dsn&dbpwd=$dbpwd"; ?>">Proceed to next test</A> -<?php - } -} else { -?> -<form action=odbc-t4.php method=post> -<table border=0> -<tr><td>Database: </td><td><input type=text name=dsn></td></tr> -<tr><td>User: </td><td><input type=text name=dbuser></td></tr> -<tr><td>Password: </td><td><input type=password name=dbpwd></td></tr> -</table> -<input type=submit value=connect> - -</form> -<?php - } -?> -</BODY> -</HTML> diff --git a/tests/odbc-t5.php b/tests/odbc-t5.php deleted file mode 100644 index 13af52d222..0000000000 --- a/tests/odbc-t5.php +++ /dev/null @@ -1,137 +0,0 @@ -<HTML> -<HEAD> -<TITLE>Database test #5</TITLE> -</HEAD> -<BODY> -<H1>ODBC Test 5 - Blobs</H1> -<?php - if(!isset($gif1file) && !isset($display) || - ($gif1file == "none" && $gif2file == "none" - && $gif3file == "none")){ -?> -<H2>Please select the images (gif) you want to put into the database</H2> -<FORM METHOD="POST" ACTION="<?php echo $PHP_SELF ?>" ENCTYPE="multipart/form-data"> -Image 1: <INPUT TYPE="file" NAME="gif1file" VALUE="" SIZE="48"><P> -Image 2: <INPUT TYPE="file" NAME="gif2file" VALUE="" SIZE="48"><P> -Image 3: <INPUT TYPE="file" NAME="gif3file" VALUE="" SIZE="48"><P> -Blob database type name: <INPUT TYPE="text" NAME="datatype" VALUE="LONG BYTE" SIZE="32"> -<P> -<INPUT TYPE="hidden" name="dsn" value="<?php echo $dsn ?>"> -<INPUT TYPE="hidden" name="dbuser" value="<?php echo $dbuser ?>"> -<INPUT TYPE="hidden" name="dbpwd" value="<?php echo $dbpwd ?>"> -<INPUT TYPE="submit" VALUE="Send File(s)"> -| <INPUT TYPE="reset" VALUE="reset"> -</FORM> -</BODY> -</HTML> -<?php - exit; - } - - if(isset($dbuser)){ - echo "Connecting to $dsn as $dbuser\n"; - $conn = odbc_connect($dsn, $dbuser, $dbpwd); - if(!$conn){ -?> -<H2>Error connecting to database! Check DSN, username and password</H2> -<?php - }else{ -?> - - OK<p> -<?php - if(isset($display)){ - if(($res = odbc_exec($conn, 'select id from php_test'))){ - echo "<H3>Images in database</H3>"; - while(odbc_fetch_into($res, &$imgs)){ - echo "$imgs[0] : <IMG SRC=\"odbc-display.php?id=$imgs[0]&dbuser=$dbuser&dsn=$dsn&dbpwd=$dbpwd\">\n<P>"; - } - }else{ - echo "Couldn't execute query"; - } - echo "\n</BODY>\n</HTML>"; - exit; - } -?> -Dropping table "php_test" -<?php - Error_Reporting(0); - $res = odbc_exec($conn, "drop table php_test"); - if($res){ - odbc_free_result($res); - } -?> - - OK<p> -Creating table "php_test": -<?php - $res = odbc_exec($conn, "create table php_test (id char(32), gif $datatype)"); - if($res){ - odbc_free_result($res); -?> - - OK<p> -Table Info:<br> -<table> - <tr> - <th>Name</th> - <th>Type</th> - <th>Length</th> - </tr> -<?php - $info = odbc_exec($conn,"select * from php_test"); - $numfields = odbc_num_fields($info); - - for($i=1; $i<=$numfields; $i++){ -?> - <tr> - <td><?php echo odbc_field_name($info, $i) ?></td> - <td><?php echo odbc_field_type($info, $i) ?></td> - <td><?php echo odbc_field_len($info,$i) ?></td> - </tr> -<?php - } - odbc_free_result($info); -?> -</table> - -Inserting data: -<?php - echo "$gif1file - $gif2file - $gif3file"; - - odbc_free_result($res); - $res = odbc_prepare($conn, "insert into php_test values(?,?)"); - if($gif1file != "none"){ - $params[0] = "image1"; - $params[1] = "'$gif1file'"; - odbc_execute($res, $params); - } - if($gif2file != "none"){ - $params[0] = "image2"; - $params[1] = "'$gif2file'"; - odbc_execute($res, $params); - } - if($gif3file != "none"){ - $params[0] = "image3"; - $params[1] = "'$gif3file'"; - odbc_execute($res, $params); - } -?> - - OK<P> -<A HREF="<?php echo "$PHP_SELF?display=y&dbuser=$dbuser&dsn=$dsn&dbpwd=$dbpwd" ?>">Display Images</A> -<?php - } - } - } else { -?> -<form action=odbc-t5.php method=post> -<table border=0> -<tr><td>Database: </td><td><input type=text name=dsn></td></tr> -<tr><td>User: </td><td><input type=text name=dbuser></td></tr> -<tr><td>Password: </td><td><input type=password name=dbpwd></td></tr> -</table> -<input type=submit value=connect> - -</form> -<?php - } -?> -</BODY> -</HTML> diff --git a/tests/quicktester.inc b/tests/quicktester.inc deleted file mode 100644 index 48ed6b549f..0000000000 --- a/tests/quicktester.inc +++ /dev/null @@ -1,75 +0,0 @@ -<?php - /* - Helper for simple tests to check return-value. Usage: - - $tests = <<<TESTS - expected_return_value === expression - 2 === 1+1 - 4 === 2*2 - FALSE === @ fopen('non_existent_file') -TESTS; - include( 'tests/quicktester.inc' ); - - Expect: OK - - Remember to NOT put a trailing ; after a line! - - */ -error_reporting(E_ALL); -$tests = explode("\n",$tests); -$success = TRUE; -foreach ($tests as $n=>$test) -{ - // ignore empty lines - if (!$test) continue; - - // warn for trailing ; - if (substr(trim($test), -1, 1) === ';') { - echo "WARNING: trailing ';' found in test ".($n+1)."\n"; - exit; - } - - // try for operators - $operators = array('===', '~=='); - $operator = NULL; - foreach ($operators as $a_operator) { - if (strpos($test, $a_operator)!== FALSE) { - $operator = $a_operator; - list($left,$right) = explode($operator, $test); - break; - } - } - if (!$operator) { - echo "WARNING: unknown operator in '$test' (1)\n"; - exit; - } - - $left = eval("return ($left );"); - $right = eval("return ($right);"); - switch (@$operator) { - case '===': // exact match - $result = $left === $right; - break; - case '~==': // may differ after 12th significant number - if ( !is_float($left ) && !is_int($left ) - || !is_float($right) && !is_int($right)) { - $result = FALSE; - break; - } - $result = abs(($left-$right) / $left) < 1e-12; - break; - default: - echo "WARNING: unknown operator in '$test' (2)\n"; - exit; - } - - $success = $success && $result; - if (!$result) { - echo "\nAssert failed:\n"; - echo "$test\n"; - echo "Left: ";var_dump($left ); - echo "Right: ";var_dump($right); - } -} -if ($success) echo "OK"; - diff --git a/tests/recurse b/tests/recurse deleted file mode 100644 index 5b8c646f6b..0000000000 --- a/tests/recurse +++ /dev/null @@ -1,21 +0,0 @@ -<? - -function factorial($n) -{ - if ($n==0 || $n==1) { - return 1; - } else { - return $n*factorial($n-1); - } -} - - -for ($k=0; $k<10; $k++): -for ($i=0,$sum=0; $i<50; $i++) { - $sum = $sum+factorial($i); -} -endfor; - -print "\$sum=$sum\n"; - - diff --git a/tests/run-test/test001.phpt b/tests/run-test/test001.phpt deleted file mode 100644 index 370d09c953..0000000000 --- a/tests/run-test/test001.phpt +++ /dev/null @@ -1,6 +0,0 @@ ---TEST-- -EXPECT ---FILE-- -abc ---EXPECT-- -abc
\ No newline at end of file diff --git a/tests/run-test/test002.phpt b/tests/run-test/test002.phpt deleted file mode 100644 index 7b91f35c8d..0000000000 --- a/tests/run-test/test002.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -EXPECTF ---FILE-- -123 --123 -+123 -+1.1 -abc -0abc -x ---EXPECTF-- -%d -%i -%i -%f -%s -%x -%c
\ No newline at end of file diff --git a/tests/run-test/test003.phpt b/tests/run-test/test003.phpt deleted file mode 100644 index c1afad15f7..0000000000 --- a/tests/run-test/test003.phpt +++ /dev/null @@ -1,6 +0,0 @@ ---TEST-- -EXPECTREGEX ---FILE-- -abcde12314235xyz34264768286abcde ---EXPECTREGEX-- -[abcde]+[0-5]*xyz[2-8]+abcde
\ No newline at end of file diff --git a/tests/run-test/test004.phpt b/tests/run-test/test004.phpt deleted file mode 100644 index 19dbdede8c..0000000000 --- a/tests/run-test/test004.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -INI section allows '=' ---INI-- -arg_separator.input== ---FILE-- -<?php -var_dump(ini_get('arg_separator.input')); -?> ---EXPECT-- -string(1) "="
\ No newline at end of file diff --git a/tests/run-test/test005.phpt b/tests/run-test/test005.phpt deleted file mode 100644 index b54cbc50e6..0000000000 --- a/tests/run-test/test005.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -Error message handling (without ZendOptimizer) ---SKIPIF-- -<?php -!extension_loaded("Zend Optimizer") or die("skip Zend Optimizer is loaded"); -?> ---FILE-- -<?php -// If this test fails ask the developers of run-test.php -// -// We check the general ini settings which affect error handling -// and than verify if a message is given by a division by zero. -// EXPECTF is used here since the error format may change but ut -// should always contain 'Division by zero'. -var_dump(ini_get('display_errors')); -var_dump(ini_get('error_reporting')); -var_dump(ini_get('log_errors')); -var_dump(ini_get('track_errors')); -ini_set('display_errors', 0); -var_dump(ini_get('display_errors')); -var_dump($php_errormsg); -$error = 1 / 0; -var_dump($php_errormsg); -?> ---EXPECTF-- -string(1) "1" -string(4) "4095" -string(1) "0" -string(1) "1" -string(1) "0" -NULL -string(%d) "%sivision by zer%s" diff --git a/tests/run-test/test006.phpt b/tests/run-test/test006.phpt deleted file mode 100644 index 4dca66a4f7..0000000000 --- a/tests/run-test/test006.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -Error messages are shown ---FILE-- -<?php -// If this test fails ask the developers of run-test.php -$error = 1 / 0; -?> ---EXPECTREGEX-- -.*Division by zero.* diff --git a/tests/run-test/test007.phpt b/tests/run-test/test007.phpt Binary files differdeleted file mode 100644 index f5f934f72e..0000000000 --- a/tests/run-test/test007.phpt +++ /dev/null diff --git a/tests/run-test/test008.phpt b/tests/run-test/test008.phpt deleted file mode 100644 index 14fff59bd8..0000000000 --- a/tests/run-test/test008.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -Error message handling (with ZendOptimizer) ---SKIPIF-- -<?php -extension_loaded("Zend Optimizer") or die("skip Zend Optimizer is not loaded"); -?> ---FILE-- -<?php -// If this test fails ask the developers of run-test.php -// -// We check the general ini settings which affect error handling -// and than verify if a message is given by a division by zero. -// EXPECTF is used here since the error format may change but ut -// should always contain 'Division by zero'. -var_dump(ini_get('display_errors')); -var_dump(ini_get('error_reporting')); -var_dump(ini_get('log_errors')); -var_dump(ini_get('track_errors')); -ini_set('display_errors', 0); -var_dump(ini_get('display_errors')); -var_dump($php_errormsg); -$error = 1 / 0; -var_dump($php_errormsg); -?> ---EXPECTF-- -%s: %sivision by zero in %s on line %d -string(1) "1" -string(4) "4095" -string(1) "0" -string(1) "1" -string(1) "0" -string(%d) "%sivision by zer%s" -string(%d) "%sivision by zer%s" diff --git a/tests/run-test/test008a.phpt b/tests/run-test/test008a.phpt deleted file mode 100644 index 7916ff2352..0000000000 --- a/tests/run-test/test008a.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -Error message handling (without ZendOptimizer) ---SKIPIF-- -<?php -if (extension_loaded("Zend Optimizer")) die("skip Zend Optimizer is loaded"); -?> ---FILE-- -<?php -// If this test fails ask the developers of run-test.php -// -// We check the general ini settings which affect error handling -// and than verify if a message is given by a division by zero. -// EXPECTF is used here since the error format may change but ut -// should always contain 'Division by zero'. -var_dump(ini_get('display_errors')); -var_dump(ini_get('error_reporting')); -var_dump(ini_get('log_errors')); -var_dump(ini_get('track_errors')); -ini_set('display_errors', 0); -var_dump(ini_get('display_errors')); -var_dump($php_errormsg); -$error = 1 / 0; -var_dump($php_errormsg); -?> ---EXPECTF-- -string(1) "1" -string(4) "4095" -string(1) "0" -string(1) "1" -string(1) "0" -NULL -string(%d) "%sivision by zer%s" diff --git a/tests/run-test/test009.phpt b/tests/run-test/test009.phpt deleted file mode 100644 index 650686f690..0000000000 --- a/tests/run-test/test009.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -print_r(Object) ---FILE-- -<?php -class Foo {} -$foo = new Foo; -print_r($foo); -?> ---EXPECTF-- -Foo Object -( -) diff --git a/tests/run.html b/tests/run.html deleted file mode 100644 index 281e9e57c8..0000000000 --- a/tests/run.html +++ /dev/null @@ -1,11 +0,0 @@ -<html> -<body> -<form action="run.php" method="POST"> - -<textarea name="code" cols=50 rows=20> -</textarea><br> -<input type="submit" value="Go!"> -</form> - -</body> -</html> diff --git a/tests/run.php b/tests/run.php deleted file mode 100644 index a6792b5af7..0000000000 --- a/tests/run.php +++ /dev/null @@ -1,17 +0,0 @@ -<? -if (!isset($code)) { - exit("No code submitted."); -} -?> -<html> -<body> -Executing:<br> -<? -highlight_string("<?php \n$code\n?>"); -?> -<hr width="40%"> -<? -eval($code); -?> -</body> -</html>
\ No newline at end of file diff --git a/tests/scan_cases b/tests/scan_cases deleted file mode 100644 index d562230fde..0000000000 --- a/tests/scan_cases +++ /dev/null @@ -1,28 +0,0 @@ -# Test file used by testscanf.php. Feel free to add additional cases -# sscanf test cases. formatted to be slurped and split by explode -%d|48| valid decimal (positive) -%d|-98| valid signed decimal (negative) -%d|56a| integer scan : decimal digit followed by alpha -%4d|558071|decimal integer with width specification -%i|-5489|valid signed integer (negative) -%s| the rain in spain | plain ole string matched with %s -%10s|jabberwocky| string with width specifier -%f|289.071| valid float (%f) -%f|-0.403| valid negative (%f) -%3f|76.4|Float with width specifier ending at decimal point -%3f"|789.4|Float with width specifier -%o|0321|octal with leading 0 -%o|327| valid octal digits -%o|380| octal scan with octal digit followed by non-octal -%x|fe| valid hex| -%x|0xfe| "c" style hex with leading 0x| -%x|455| hex with all single digits < f -%x|-98| hex (negative signed int) -%c|y| single char -%4c|tulips|Character with width specification (4) -%e|10e-9| signed floating point with negative exponent -%e|10e+9| signed floating point with explicit positive exponent -%e|10e9| signed floating point with positive exponent (no + sign) -# next we test multiple cases - %d %i %o %u %x %s %c %e %f %g | 19 84 0666 2000 0xface your x 31e+9 0.912 2.4 |multiple specifiers - diff --git a/tests/strings/001.phpt b/tests/strings/001.phpt deleted file mode 100644 index 4eacb89592..0000000000 --- a/tests/strings/001.phpt +++ /dev/null @@ -1,209 +0,0 @@ ---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 deleted file mode 100644 index 96bc722e0e..0000000000 --- a/tests/strings/002.phpt +++ /dev/null @@ -1,85 +0,0 @@ ---TEST-- -Formatted print functions ---POST-- ---GET-- ---FILE-- -<?php -error_reporting(0); - -$fp = fopen("php://stdout", "w") or die("Arrggsgg!!"); -$x = fprintf($fp, "fprintf test 1:%.5s\n", "abcdefghij"); -var_dump($x); -fclose($fp); - -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"); -printf("printf test 26:%2\$d %1\$d\n", 1, 2); -printf("printf test 27:%3\$d %d %d\n", 1, 2, 3); -printf("printf test 28:%2\$02d %1\$2d\n", 1, 2); -printf("printf test 29:%2\$-2d %1\$2d\n", 1, 2); -print("printf test 30:"); printf("%0\$s", 1); print("x\n"); -vprintf("vprintf test 1:%2\$-2d %1\$2d\n", array(1, 2)); - - -?> ---EXPECT-- -fprintf test 1:abcde -int(20) -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 -printf test 26:2 1 -printf test 27:3 1 2 -printf test 28:02 1 -printf test 29:2 1 -printf test 30:x -vprintf test 1:2 1 diff --git a/tests/strings/004.phpt b/tests/strings/004.phpt deleted file mode 100644 index 596928cdff..0000000000 --- a/tests/strings/004.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -highlight_string() buffering ---POST-- ---INI-- -highlight.string=#DD0000 -highlight.comment=#FF9900 -highlight.keyword=#007700 -highlight.bg=#FFFFFF -highlight.default=#0000BB -highlight.html=#000000 ---GET-- ---FILE-- -<?php -$var = highlight_string("<br /><?php echo \"foo\"; ?><br />"); -$var = highlight_string("<br /><?php echo \"bar\"; ?><br />", TRUE); -echo "\n[$var]\n"; -?> ---EXPECT-- -<code><font color="#000000"> -<br /><font color="#0000BB"><?php </font><font color="#007700">echo </font><font color="#DD0000">"foo"</font><font color="#007700">; </font><font color="#0000BB">?></font><br /></font> -</code> -[<code><font color="#000000"> -<br /><font color="#0000BB"><?php </font><font color="#007700">echo </font><font color="#DD0000">"bar"</font><font color="#007700">; </font><font color="#0000BB">?></font><br /></font> -</code>] diff --git a/tests/strings/bug22592.phpt b/tests/strings/bug22592.phpt deleted file mode 100755 index 0c13e50164..0000000000 --- a/tests/strings/bug22592.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Bug #22592 (Cascading assignments to strings with curly braces broken) ---FILE-- -<?php -$wrong = $correct = 'abcdef'; - -$t = $x[] = 'x'; - -var_dump($correct); -var_dump($wrong); - -$correct{1} = '*'; -$correct{3} = '*'; -$correct{5} = '*'; - -// This produces the -$wrong{1} = $wrong{3} = $wrong{5} = '*'; - -var_dump($correct); -var_dump($wrong); - -?> ---EXPECT-- -string(6) "abcdef" -string(6) "abcdef" -string(6) "a*c*e*" -string(6) "a*c*e*" diff --git a/tests/strings/bug26703.phpt b/tests/strings/bug26703.phpt deleted file mode 100644 index c86e1759d5..0000000000 --- a/tests/strings/bug26703.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Bug #26703 (Certain characters inside strings incorrectly treated as keywords) ---INI-- -highlight.string=#DD0000 -highlight.comment=#FF9900 -highlight.keyword=#007700 -highlight.bg=#FFFFFF -highlight.default=#0000BB -highlight.html=#000000 ---FILE-- -<?php - highlight_string('<?php echo "foo[] $a \n"; ?>'); -?> ---EXPECT-- -<code><font color="#000000"> -<font color="#0000BB"><?php </font><font color="#007700">echo </font><font color="#DD0000">"foo[] $a \n"</font><font color="#007700">; </font><font color="#0000BB">?></font> -</font> -</code> diff --git a/tests/test.pl b/tests/test.pl deleted file mode 100644 index 2502cb1298..0000000000 --- a/tests/test.pl +++ /dev/null @@ -1,34 +0,0 @@ -<? - -$i = 0; -$j = 1; - -for ($k=0; $k<1000000; $k = $k+1) { - while ($i<10000000) { - if (($i%"4")<1) { - $i = $i+"1"; - if ($j%"2") { - $i = $i * "2"; - } - } elseif (($i%"4")<2) { - $i = $i+"2"; - if ($j%"2") { - $i = $i * "2"; - } - } elseif (($i%"4")<3) { - $i = $i+3; - if ($j%"2") { - $i = $i * "2"; - } - } else { - $i = $i+"4"; - if ($j%"2") { - $i = $i * "2"; - } - } - $j = $j+1; - } -} -print $i; -print "\n"; - diff --git a/tests/test_class_inheritance b/tests/test_class_inheritance deleted file mode 100644 index 3f903e62d1..0000000000 --- a/tests/test_class_inheritance +++ /dev/null @@ -1,29 +0,0 @@ -<? - -class BaseClass { - var $class_name = "BaseClass"; - - function BaseClass($value) { - print "value is '$value'\n"; - } - function MyClassName() { - return $this->class_name; - } -}; - - -class ChildClass { - var $class_name = "ChildClass"; - - function ChildClass($value, $new_value) { - BaseClass::BaseClass($value); - print "new value is '$new_value'\n"; - } - function MyClassName($a_value) { - return BaseClass::MyClassName()." and the value is '$a_value'"; - } -}; - - -$obj = new ChildClass("Test", "Another test"); -print $obj->MyClassName("not interesting");
\ No newline at end of file diff --git a/tests/testarray b/tests/testarray deleted file mode 100644 index bee5cca546..0000000000 --- a/tests/testarray +++ /dev/null @@ -1,21 +0,0 @@ -This is a small test.... -<? - -/* - * this is a multiline comment... - */ - -for ($j=0; $j<=20; $j++) { - for ($i[0][0]=0; $i[0][0]<10000; $i[0][0]++) { - $i[1] += $i[0][0]; // this is a single line comment - } -} - -/* this is another multi -line - comment...****** -/ -*/ - -print $i[1]."\n"; - diff --git a/tests/testarray.pl b/tests/testarray.pl deleted file mode 100644 index 9ec83e184c..0000000000 --- a/tests/testarray.pl +++ /dev/null @@ -1,5 +0,0 @@ -for ($i[0][0]=0; $i[0][0]<1000000; $i[0][0]++) { - $i[1] += $i[0][0]; -} - -print $i[1]; diff --git a/tests/testarray2 b/tests/testarray2 deleted file mode 100644 index 91926beaff..0000000000 --- a/tests/testarray2 +++ /dev/null @@ -1,5 +0,0 @@ - -<? -for ($i="aaa"; $i<"bbb\nbbb"; $i++) { - print $i; -} diff --git a/tests/testarray2.pl b/tests/testarray2.pl deleted file mode 100644 index e72c526d4f..0000000000 --- a/tests/testarray2.pl +++ /dev/null @@ -1,3 +0,0 @@ -for ($i="aaa"; $i lt "bbb"; $i++) { - print "$i\n"; -} diff --git a/tests/testclassfunc b/tests/testclassfunc deleted file mode 100644 index 007bf3bd37..0000000000 --- a/tests/testclassfunc +++ /dev/null @@ -1,9 +0,0 @@ -<? -class foo { - function bar() { - print "Hey there!\n"; - } -}; - -foo::bar(); - diff --git a/tests/testcom b/tests/testcom deleted file mode 100644 index 0feb50d1ff..0000000000 --- a/tests/testcom +++ /dev/null @@ -1,11 +0,0 @@ -<? -$word = new COM("word.application") or die("Unable to instanciate Word"); -print "Loaded Word, version {$word->Version}\n"; -$word->Visible = 1; -$word->Documents->Add(); -$word->Selection->TypeText("This is a test..."); -$word->Quit(); -/* -$word->Documents[1]->SaveAs("Useless test.doc"); -*/ -?>
\ No newline at end of file diff --git a/tests/testcpdf b/tests/testcpdf deleted file mode 100644 index a74087d18e..0000000000 --- a/tests/testcpdf +++ /dev/null @@ -1,97 +0,0 @@ -<?php - function draw_text($cpdf, $fontname, $size, $x, $y, $text="") { - cpdf_begin_text($cpdf); - cpdf_set_font($cpdf, $fontname, $size, 4); - if($text == "") - cpdf_text($cpdf, $fontname." ".$size." Point", $x, $y, 1); - else - cpdf_text($cpdf, $text, $x, $y, 1); - cpdf_end_text($cpdf); - } - - $cpdf = cpdf_open(0); - cpdf_set_Creator($cpdf, "Creator"); - cpdf_set_Title($cpdf, "Title"); - cpdf_set_Subject($cpdf, "Subject"); - cpdf_set_Keywords($cpdf, "Keyword1, Keyword2"); - cpdf_set_viewer_preferences($cpdf, 1); - - cpdf_page_init($cpdf, 1, 0, 600, 400, 1); - $level1 = cpdf_add_outline($cpdf, 0, 0, 1, 1, "Examples"); - $level2a = cpdf_add_outline($cpdf, $level1, 1, 0, 1, "Text"); - draw_text($cpdf, "Helvetica", 18.0, 50, 330); - draw_text($cpdf, "Helvetica-Bold", 18.0, 50, 310); - draw_text($cpdf, "Helvetica-Oblique", 18.0, 50, 290); - draw_text($cpdf, "Helvetica-BoldOblique", 18.0, 50, 270); - draw_text($cpdf, "Times-Roman", 18.0, 50, 250); - draw_text($cpdf, "Times-Bold", 18.0, 50, 230); - draw_text($cpdf, "Times-Italic", 18.0, 50, 210); - draw_text($cpdf, "Times-BoldItalic", 18.0, 50, 190); - draw_text($cpdf, "Courier", 18.0, 50, 170); - draw_text($cpdf, "Courier-Bold", 18.0, 50, 150); - draw_text($cpdf, "Courier-Oblique", 18.0, 50, 130); - draw_text($cpdf, "Courier-BoldOblique", 18.0, 50, 110); - draw_text($cpdf, "Symbol", 18.0, 50, 90); - draw_text($cpdf, "ZapfDingbats", 18.0, 50, 70); - - cpdf_page_init($cpdf, 2, 0, 400, 400, 1); - $level2b = cpdf_add_outline($cpdf, $level2a, 0, 0, 2, "Annotations, Hyperlinks"); - cpdf_add_annotation($cpdf, 100, 100, 300, 200, "Annotation", "Text of Annotation"); - draw_text($cpdf, "Helvetica", 12.0, 102, 116, "Click here to go to"); - draw_text($cpdf, "Helvetica", 12.0, 102, 103, "http://localhost"); - cpdf_set_action_url($cpdf, 100, 100, 202, 130, "http://localhost"); - - cpdf_page_init($cpdf, 3, 0, 400, 600, 1); - $level2c = cpdf_add_outline($cpdf, $level2b, 0, 0, 3, "Drawing"); - cpdf_rect($cpdf, 100, 100, 90, 90, 1); - cpdf_stroke($cpdf); - cpdf_rect($cpdf, 200, 100, 90, 90, 1); - cpdf_fill_stroke($cpdf); - - cpdf_setgray_fill($cpdf, 0.5); - cpdf_circle($cpdf, 140, 250, 35, 1); - cpdf_stroke($cpdf); - cpdf_circle($cpdf, 240, 250, 35, 1); - cpdf_fill_stroke($cpdf); - - cpdf_moveto($cpdf, 300, 100, 1); - cpdf_lineto($cpdf, 350, 100, 1); - cpdf_curveto($cpdf, 350, 100, 325, 300, 300, 100, 1); - cpdf_stroke($cpdf); - - cpdf_moveto($cpdf, 400, 100, 1); - cpdf_lineto($cpdf, 450, 100, 1); - cpdf_curveto($cpdf, 450, 100, 425, 400, 400, 100, 1); - cpdf_fill_stroke($cpdf); - - cpdf_page_init($cpdf, 4, 0, 400, 600, 1); - $level2d = cpdf_add_outline($cpdf, $level2c, 0, 0, 4, "Images, Clipping"); - cpdf_import_jpeg($cpdf, "figure.jpg", 50, 50, -10.0, 0.0, 300.0, 0.0, 0.0, 1, 1); - cpdf_save($cpdf); - cpdf_newpath($cpdf); - cpdf_moveto($cpdf, 300, 50); - cpdf_lineto($cpdf, 450, 50, 1); - cpdf_curveto($cpdf, 450, 100, 375, 300, 300, 100, 1); - cpdf_closepath($cpdf); - cpdf_rect($cpdf, 350, 215, 100, 30); - cpdf_clip($cpdf); - cpdf_newpath($cpdf); /* needed because clip doesn't consume path */ - draw_text($cpdf, "Helvetica", 18.0, 250, 130); - cpdf_import_jpeg($cpdf, "figure.jpg", 300, 50, 0.0, 0.0, 300.0, 0.0, 0.0, 0, 1); /* watch for the second last parameter. It is 0 to disable extra gsave/grestore */ - cpdf_restore($cpdf); - - cpdf_page_init($cpdf, 5, 0, 400, 400, 1); - $level2e = cpdf_add_outline($cpdf, $level2d, 0, 0, 5, "GD Image"); - - $gdimage = imagecreate(100, 100); - $color = imagecolorallocate($gdimage, 100, 190, 0); - $black = imagecolorallocate($gdimage, 0, 0, 0); - imageline($gdimage, 2, 2, 90, 90, $black); - - cpdf_place_inline_image($cpdf, $gdimage, 50, 50, 10.0, 150, 50.0, 1, 1); - imagedestroy($gdimage); - - cpdf_finalize($cpdf); - cpdf_output_buffer($cpdf); - cpdf_close($cpdf); -?> diff --git a/tests/testcpdfclock b/tests/testcpdfclock deleted file mode 100644 index c885cc8e09..0000000000 --- a/tests/testcpdfclock +++ /dev/null @@ -1,87 +0,0 @@ -<?php -$pdffilename = "clock.pdf"; -$radius = 200; -$margin = 20; -$pagecount = 99; - -$pdf = cpdf_open(0); -cpdf_set_creator($pdf, "pdf_clock.php3"); -cpdf_set_title($pdf, "Analog Clock"); - -while($pagecount-- > 0) { - cpdf_page_init($pdf, $pagecount+1, 0, 2 * ($radius + $margin), 2 * ($radius + $margin), 1.0); - - cpdf_set_page_animation($pdf, 4, 0.5, 0, 0, 0); /* wipe */ - - cpdf_translate($pdf, $radius + $margin, $radius + $margin); - cpdf_save($pdf); - cpdf_setrgbcolor($pdf, 0.0, 0.0, 1.0); - - /* minute strokes */ - cpdf_setlinewidth($pdf, 2.0); - for ($alpha = 0; $alpha < 360; $alpha += 6) - { - cpdf_rotate($pdf, 6.0); - cpdf_moveto($pdf, $radius, 0.0); - cpdf_lineto($pdf, $radius-$margin/3, 0.0); - cpdf_stroke($pdf); - } - - cpdf_restore($pdf); - cpdf_save($pdf); - - /* 5 minute strokes */ - cpdf_setlinewidth($pdf, 3.0); - for ($alpha = 0; $alpha < 360; $alpha += 30) - { - cpdf_rotate($pdf, 30.0); - cpdf_moveto($pdf, $radius, 0.0); - cpdf_lineto($pdf, $radius-$margin, 0.0); - cpdf_stroke($pdf); - } - - $ltime = getdate(); - - /* draw hour hand */ - cpdf_save($pdf); - cpdf_rotate($pdf, -(($ltime['minutes']/60.0) + $ltime['hours'] - 3.0) * 30.0); - cpdf_moveto($pdf, -$radius/10, -$radius/20); - cpdf_lineto($pdf, $radius/2, 0.0); - cpdf_lineto($pdf, -$radius/10, $radius/20); - cpdf_closepath($pdf); - cpdf_fill($pdf); - cpdf_restore($pdf); - - /* draw minute hand */ - cpdf_save($pdf); - cpdf_rotate($pdf, -(($ltime['seconds']/60.0) + $ltime['minutes'] - 15.0) * 6.0); - cpdf_moveto($pdf, -$radius/10, -$radius/20); - cpdf_lineto($pdf, $radius * 0.8, 0.0); - cpdf_lineto($pdf, -$radius/10, $radius/20); - cpdf_closepath($pdf); - cpdf_fill($pdf); - cpdf_restore($pdf); - - /* draw second hand */ - cpdf_setrgbcolor($pdf, 1.0, 0.0, 0.0); - cpdf_setlinewidth($pdf, 2); - cpdf_save($pdf); - cpdf_rotate($pdf, -(($ltime['seconds'] - 15.0) * 6.0)); - cpdf_moveto($pdf, -$radius/5, 0.0); - cpdf_lineto($pdf, $radius, 0.0); - cpdf_stroke($pdf); - cpdf_restore($pdf); - - /* draw little circle at center */ - cpdf_circle($pdf, 0, 0, $radius/30); - cpdf_fill($pdf); - - cpdf_restore($pdf); - - cpdf_finalize_page($pdf, $pagecount+1); -} - -cpdf_finalize($pdf); -cpdf_save_to_file($pdf, $pdffilename); -$pdf = cpdf_close($pdf); -?> diff --git a/tests/testdom b/tests/testdom deleted file mode 100644 index c7012e0e3c..0000000000 --- a/tests/testdom +++ /dev/null @@ -1,73 +0,0 @@ -<?php -$xmlstr = "<?xml version='1.0' standalone='yes'?> -<!DOCTYPE chapter SYSTEM '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd' -[ <!ENTITY sp \"spanish\"> -]> -<!-- lsfj --> -<chapter language='en'><title language='en'>Title</title> -<para language='ge'> -&sp; -<!-- comment --> -<informaltable language='&sp;kkk'> -<tgroup cols='3'> -<tbody> -<row><entry>a1</entry><entry morerows='1'>b1</entry><entry>c1</entry></row> -<row><entry>a2</entry><entry>c2</entry></row> -<row><entry>a3</entry><entry>b3</entry><entry>c3</entry></row> -</tbody> -</tgroup> -</informaltable> -</para> -</chapter> "; - -echo "Test 1: accessing single nodes from php\n"; -$dom = xmldoc($xmlstr); -if(!$dom) { - echo "Error while parsing the document\n"; - exit; -} - -$children = $dom->childNodes(); -print_r($children); - -echo "--------- root\n"; -$rootnode = $dom->documentElement(); -print_r($rootnode); - -echo "--------- children of root\n"; -$children = $rootnode->childNodes(); -print_r($children); - -// The last node should be identical with the last entry in the children array -echo "--------- last\n"; -$last = $rootnode->lastChild(); -print_r($last); - -// The parent of this last node is the root again -echo "--------- parent\n"; -$parent = $last->parent(); -print_r($parent); - -// The children of this parent are the same children as one above -echo "--------- children of parent\n"; -$children = $parent->childNodes(); -print_r($children); - -echo "--------- creating a new attribute\n"; -$attr = $dom->createAttribute("src", "picture.gif"); -print_r($attr); - -$rootnode->setAttributeNode($attr); /* Not implemented */ -$attr = $rootnode->setAttribute("src", "picture.gif"); -$attr = $rootnode->getAttribute("src"); -print_r($attr); - -echo "--------- attribute of rootnode\n"; -$attrs = $rootnode->attributes(); -print_r($attrs); - -echo "--------- children of an attribute\n"; -$children = $attrs[0]->childNodes(); -print_r($children); - -?> diff --git a/tests/testfe b/tests/testfe deleted file mode 100644 index ea62760635..0000000000 --- a/tests/testfe +++ /dev/null @@ -1,18 +0,0 @@ -<? -$foo = array(7,"foo",3,array(1,2),4); - -for ($i=0; $i<3; $i++): - -foreach($a, $foo ) { - if (gettype($a)=="array") { - print "Array:\n"; - foreach($b, $a) { - print "\t$b\n"; - } - print "End of array.\n"; - } else { - print "$a\n"; - } -// print "$a\n"; -} -endfor; diff --git a/tests/testfunc b/tests/testfunc deleted file mode 100644 index fa64be2e6f..0000000000 --- a/tests/testfunc +++ /dev/null @@ -1,33 +0,0 @@ -<? -function foo() -{ - $i=0; - - if ($i) { - $a = "zeev"; - } else { - $b = "andi"; - } -} - -function bar() -{ - foo(); -} - -for ($i=0; $i<10; $i++) { - bar(); -} - - -for ($i=0; $i<10; $i++) { - bar(); -} - -print "Got here..... - -"; - -$a = 7; -$a = 5; -print "Got here....\n\n"; diff --git a/tests/testfunc.pl b/tests/testfunc.pl deleted file mode 100644 index 87864866ff..0000000000 --- a/tests/testfunc.pl +++ /dev/null @@ -1,20 +0,0 @@ -sub foo() -{ - my $i=0; - - if ($i) { - my $a = "zeev"; - } else { - my $b = "andi"; - } -} - - -sub bar() -{ - foo(); -} - -for ($i=0; $i<1000000; $i++) { - bar(); -} diff --git a/tests/testfunc2 b/tests/testfunc2 deleted file mode 100644 index 42f91f2bae..0000000000 --- a/tests/testfunc2 +++ /dev/null @@ -1,19 +0,0 @@ -<? -function foo($i) -{ - if ($i) { - $a = "zeev"; - } else { - $b = "andi"; - } -} - - -function bar($a) -{ - foo($a); -} - -for ($i=0; $i<10000; $i=$i+1) { - bar($i); -} diff --git a/tests/testfunc2.pl b/tests/testfunc2.pl deleted file mode 100644 index 7eeaf92ffb..0000000000 --- a/tests/testfunc2.pl +++ /dev/null @@ -1,22 +0,0 @@ -sub foo -{ - my $i = shift(@_); - - if ($i) { - my $a = "zeev"; - } else { - my $b = "andi"; - } -} - - -sub bar -{ - my $i = shift(@_); - - foo($i); -} - -for ($i=0; $i<1000000; $i=$i+1) { - bar($i); -} diff --git a/tests/testfuncref b/tests/testfuncref deleted file mode 100644 index 217e4d14e0..0000000000 --- a/tests/testfuncref +++ /dev/null @@ -1,10 +0,0 @@ -<? - -function foobar() -{ - print "foobar\n"; -} - -$foobar = "foobar"; - -$a = ${"foo"."bar"}(); diff --git a/tests/testhyperwave b/tests/testhyperwave deleted file mode 100644 index 28bc19d2f9..0000000000 --- a/tests/testhyperwave +++ /dev/null @@ -1,235 +0,0 @@ -<? - $id = 188178; // A plain/text document - $collid = 169828; // A collection - $query = "Name=m*"; // Search query for test_9 - $host = "gehtnix"; - $username = "annonymous"; - $password = ""; - - $connect = hw_connect($host, 418, $username, $password); - if(hw_error($connect)) { - echo "ERROR: ".hw_errormsg($connect)."\n"; - exit; - } - - // Set all test to 'yes' if they shall be executed - $test_1 = "no"; // Get the text document with id $id and output it - $test_2 = "no"; // Check if id $id is in $collid - $test_3 = "no"; // Convert object record to object array and back - $test_4 = "no"; // Get object record of object with id $id - $test_5 = "no"; // List children of $collid - $test_6 = "no"; // List parents of $id - $test_7 = "no"; // Insert a new text document - $test_8 = "no"; // Remove the just inserted text document - $test_9 = "no"; // Searching for objects with Name $query - $test_10= "no"; // Listing all anchors of a document - $test_11= "no"; // Creates document from file and outputs it. - $test_12= "yes"; // Creates document from file and outputs it. - - /* Lists an object array - */ - function list_attr($attributes) { -// var_dump($attributes); -// return; - for($i=0; $i<count($attributes); $i++) { - $key = key($attributes); - switch($key) { - case "Title": - case "Description": - $title_arr = $attributes[$key]; - $cj = count($title_arr); - printf("%s = ", $key); - for($j=0; $j<$cj; $j++) { - $tkey = key($title_arr); - switch($tkey) { - case "en": - $flagfile = "english.gif"; - break; - case "ge": - $flagfile = "german.gif"; - break; - case "du": - $flagfile = "dutch.gif"; - break; - default: - $flagfile = "europe.gif"; - } - printf("%s:%s; ", $tkey, $title_arr[$tkey]); - - next($title_arr); - } - printf("\n"); - break; - default: - if(is_array($attributes[$key])) { - $group_arr = $attributes[$key]; - $cj = count($group_arr); - for($j=0; $j<$cj; $j++) { - printf("%s = %s\n", $key, $group_arr[$j]); - next($group_arr); - } - } else { - printf("%s = %s\n", $key, $attributes[$key]); - } - - } - next($attributes); - } - echo "\n"; - } - - // Here come the tests - if($test_1 == "yes") { - echo "TEST 1 ----------------------------------------------\n"; - echo "Get the text document with id 0x".dechex($id)."\n"; - $doc = hw_gettext($connect, $id); - if(hw_error($connect)) { - echo "ERROR: ".hw_errormsg($connect)."\n"; - exit; - } - hw_output_document($doc); - echo "\n"; - } - - if($test_2 == "yes") { - echo "TEST 2 ----------------------------------------------\n"; - echo "Checking if '$id' (0x".dechex($id).") is in collection '$collid (0x".dechex($collid).")'\n"; - $incoll = hw_incollections($connect, array($id), array($collid), 0); - if(hw_error($connect)) { - echo "ERROR: ".hw_errormsg($connect)."\n"; - exit; - } - for($i=0; $i<count($incoll); $i++) - echo $incoll[$i]."\n"; - } - - if($test_3 == "yes") { - echo "TEST 3 ----------------------------------------------\n"; - echo "Convert an object array into an object record\n"; - $objrec = hw_array2objrec(array("Title"=>"ge:Hier der Titel", "Author"=>"Hier der Autor")); - echo $objrec."\n"; - $objrec .= "\nTitle=en:Here the title"; - echo "Add another title and convert it back to an object array\n"; - $objarr = hw_objrec2array($objrec); - list_attr($objarr); - } - - if($test_4 == "yes") { - echo "TEST 4 ----------------------------------------------\n"; - echo "Get the object array of document with id 0x".dechex($id)."\n"; - $objrec = hw_getobject($connect, $id); - if(hw_error($connect)) { - echo "ERROR: ".hw_errormsg($connect)."\n"; - exit; - } - $objarr = hw_objrec2array($objrec); - list_attr($objarr); - } - - if($test_5 == "yes") { - echo "TEST 5 ----------------------------------------------\n"; - echo "List the children of collection 0x".dechex($collid)."\n"; - $children = hw_childrenobj($connect, $collid); - if(hw_error($connect)) { - echo "ERROR: ".hw_errormsg($connect)."\n"; - exit; - } - $c_children = count($children) - 1; - for($i=0; $i<$c_children; $i++) { - $objarr = hw_objrec2array($children[$i]); - list_attr($objarr); - } - list_attr($children[$c_children]); - } - - if($test_6 == "yes") { - echo "TEST 6 ----------------------------------------------\n"; - echo "List the parents of object 0x".dechex($id)."\n"; - $parents = hw_getparentsobj($connect, $collid); - if(hw_error($connect)) { - echo "ERROR: ".hw_errormsg($connect)."\n"; - exit; - } - $c_parents = count($parents) - 1; - for($i=0; $i<$c_parents; $i++) { - $objarr = hw_objrec2array($parents[$i]); - list_attr($objarr); - } - list_attr($parents[$c_parents]); - } - - if($test_7 == "yes") { - echo "TEST 7 ----------------------------------------------\n"; - echo "Inserting a new text document into 0x".dechex($collid)."\n"; - $objrec = "Type=Document\nDocumentType=text\nName=HWTest\nTitle=en:Component\nMimeType=text/plain\nAuthor=".$username; - $contents = "Ein bischen Text"; - $doc = hw_new_document($objrec, $contents, strlen($contents)+1); - $objid = hw_insertdocument($connect, $collid, $doc); - if(hw_error($connect)) { - echo "ERROR: ".hw_errormsg($connect)."\n"; - exit; - } - $objrec = hw_getobject($connect, $objid); - if(hw_error($connect)) { - echo "ERROR: ".hw_errormsg($connect)."\n"; - exit; - } - $objarr = hw_objrec2array($objrec); - list_attr($objarr); - } - - if($test_8 == "yes") { - echo "TEST 8 ----------------------------------------------\n"; - echo "Removing text document just inserted\n"; - $kk[0] = (int) $objid; - hw_mv($connect, $kk, $collid, 0); - if(hw_error($connect)) { - echo "ERROR: ".hw_errormsg($connect)."\n"; - exit; - } - echo "If the document was really deleted you should see an error now\n"; - $objrec = hw_getobject($connect, $objid); - if(hw_error($connect)) { - echo "ERROR: ".hw_errormsg($connect)."\n"; - } else { - $objarr = hw_objrec2array($objrec); - list_attr($objarr); - } - } - - if($test_9 == "yes") { - echo "TEST 9 ----------------------------------------------\n"; - echo "Searching for objects with $query\n"; - $objrecs = hw_getobjectbyqueryobj($connect, $query, -1); - $c_objrecs = count($objrecs) - 1; - echo "$c_objrecs found\n"; - for($i=0; $i<$c_objrecs; $i++) { - $objarr = hw_objrec2array($objrecs[$i]); - list_attr($objarr); - } - list_attr($objrecs[$c_objrecs]); - } - - if($test_10 == "yes") { - $anchors = hw_getanchorsobj($connect, $id); - $countanchors = count($anchors) - 1; - echo "$countanchors Anchors of Object $id\n"; - for($i=0; $i<$countanchors; $i++) { - $arr = hw_objrec2array($anchors[$i]); - list_attr($arr); - } - } - - if($test_11 == "yes") { - $doc = hw_new_document_from_file("ObjectRecord", "hw_document.txt"); - hw_output_document($doc); - } - - if($test_12 == "yes") { - $doc = hw_new_document_from_file("ObjectRecord", "hw_document.txt"); - hw_insertanchors($doc, array("Position=0x2 0x7\nObjectID=0x3\nTAnchor=Src\nDest=0x5"), array("ObjectID=0x5\nName=DestDoc")); - hw_output_document($doc); - } - - hw_close($connect); -?> diff --git a/tests/testinclude b/tests/testinclude deleted file mode 100644 index 1e9854370d..0000000000 --- a/tests/testinclude +++ /dev/null @@ -1,5 +0,0 @@ -<? -print "Before include....\n"; -$retval = include("testarray"); -print "After include, include returned $retval\n"; -?> diff --git a/tests/testobj b/tests/testobj deleted file mode 100644 index 66b003ce9c..0000000000 --- a/tests/testobj +++ /dev/null @@ -1,29 +0,0 @@ -<? -define("endl","\n"); - -class foobar { - function foobar() { - $this->initialized = 1; - } -}; - -class barbara extends foobar { - -}; - -$name = "foobar"; -$foo = new $name; // or die("Unable to construct foobar\n"); -//print $foo->initialized; - -$boo = new barbara; -print get_class($foo).endl; -print get_parent_class($foo).endl; -print get_class($boo).endl; -print get_parent_class($boo).endl; -print method_exists($foo,"foobar").endl; -print method_exists($boo,"foobar").endl; -print method_exists($boo,"barbara").endl; -//$word = new COm("word.application"); -//$word->visible = true; -//sleep(5); -//$word->quit(); diff --git a/tests/testpfpro.php b/tests/testpfpro.php deleted file mode 100644 index ffb1784bdc..0000000000 --- a/tests/testpfpro.php +++ /dev/null @@ -1,39 +0,0 @@ -<? - -if (!extension_loaded('pfpro')) { - die("pfpro module is not compiled in PHP\n"); -} - -echo "<pre>\n\n"; - -echo "Payflow Pro library is version ".pfpro_version()."\n"; - -pfpro_init(); - -$transaction = array(USER => 'mylogin', - PWD => 'mypassword', - TRXTYPE => 'S', - TENDER => 'C', - AMT => 1.50, - ACCT => '4111111111111111', - EXPDATE => '0900' - ); - -$response = pfpro_process($transaction); - -if (!$response) { - die("Couldn't establish link to signio software.\n"); -} - -echo "Signio response code was ".$response[RESULT]; -echo ", which means: ".$response[RESPMSG]."\n"; - -echo "\nDump of the transaction request "; -print_r($transaction); - -echo "\nDump of the response "; -print_r($response); - -pfpro_cleanup(); - -?> diff --git a/tests/tests.dsp b/tests/tests.dsp deleted file mode 100644 index fc19dcfe43..0000000000 --- a/tests/tests.dsp +++ /dev/null @@ -1,61 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tests" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) External Target" 0x0106
-
-CFG=tests - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "tests.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "tests.mak" CFG="tests - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "tests - Win32 Debug" (based on "Win32 (x86) External Target")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "."
-# PROP BASE Intermediate_Dir "."
-# PROP BASE Cmd_Line "NMAKE /f tests.mak"
-# PROP BASE Rebuild_Opt "/a"
-# PROP BASE Target_File "tests.exe"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "."
-# PROP Intermediate_Dir "."
-# PROP Cmd_Line "nmake /nologo /f tests.mak"
-# PROP Rebuild_Opt "/a"
-# PROP Target_File "__test_run_complete__"
-# PROP Bsc_Name ""
-# PROP Target_Dir ""
-# Begin Target
-
-# Name "tests - Win32 Debug"
-
-!IF "$(CFG)" == "tests - Win32 Debug"
-
-!ENDIF
-
-# Begin Source File
-
-SOURCE="..\run-tests.php"
-# End Source File
-# Begin Source File
-
-SOURCE=.\tests.mak
-# End Source File
-# End Target
-# End Project
diff --git a/tests/tests.mak b/tests/tests.mak deleted file mode 100644 index 8b47143544..0000000000 --- a/tests/tests.mak +++ /dev/null @@ -1,27 +0,0 @@ -# -# Win32 Makefile to run the PHP unit tests. -# -# TEST_PHP_EXECUTABLE -# Required - must point to the PHP executable to test. -# -# TEST_PHP_ERROR_STYLE -# Optional - specifies error format to output so IDE can jump to test source and log. -# Values: MSVC (Microsoft Visual C++), Emacs -# -# TEST_PHP_DETAILED -# Optional - generates a more complete and detailed log if set. -# Values: 0 or unset - no details; 1 - detailed. -# - -all : run-tests - -BIN=Debug_TS - -# Specific test(s) to run (all if not specified). -TESTS= - -run-tests : - set TEST_PHP_EXECUTABLE=$(BIN)\php-cgi.exe - set TEST_PHP_ERROR_STYLE=MSVC - set TEST_PHP_DETAILED=0 - cd .. && $(BIN)\php-cgi.exe -c tests -f run-tests.php $(TESTS) | tee tests.log diff --git a/tests/testscanf.php b/tests/testscanf.php deleted file mode 100644 index ad530978c5..0000000000 --- a/tests/testscanf.php +++ /dev/null @@ -1,113 +0,0 @@ -<?php - - -function print_value($val,$postfix="<br>") { - if (is_array($val)) { - for ($i = 0;$i< count($val);$i++) { - echo $val[$i] . $postfix; - } - } else { - echo $val . $postfix; - } -} - -function do_sscanf($string, $format) { - $s = "sscanf(\"" . $string . ",\"" . $format ."\")."; - echo "$s<br>"; - $s = str_repeat("-", strlen($s)); - echo "$s<br>"; - $output = sscanf($string,$format); - echo "Result : "; - print_value( $output ); - echo "$s<br><br>"; -} - - -function run_sscanf_test_cases($filename="scan_cases") -{ - - echo "<h3><em><br>Running Test Cases from $filename<br></em></h3>"; - $arr = file($filename); - for ($i=0;$i < count($arr);$i++) { - $line_arr = explode("|",$arr[$i]); - - $format = $line_arr[0]; - $string = $line_arr[1]; - if (count($arr) > 2) { - $comment = $line_arr[2]; - } else { - $comment = ""; - } - if ( empty($format) || empty($string) ) { - continue; - } - print("<h4>** Case : $comment ******************************</h4>"); - do_sscanf($string,$format); - } -} - -function simple_tests() { - echo "Testing sscanf with standard ANSI syntax (values returned by -reference)-<br>"; - $decimal = -1; - $string = ""; - $hex = 0; - $float = 0.0; - $octal = 0.0; - $int = -1; - - echo "<h3><em><br>Simple Test<br></em></h3>"; - echo "sscanf('10','%d',&\$decimal) <br>"; - echo "<br>BEFORE : <br> decimal = $decimal."; - $foo = sscanf("10","%d",&$decimal); - echo "<br>AFTER : <br> decimal = $decimal <br>"; - - - echo "<h3><em><br>Simple Test 2<br></em></h3>"; - echo "sscanf(\"ghost 0xface\",\"%s %x\",&\$string, &\$int)<br>"; - echo "<br>BEFORE : <br> string = $string, int = $int<br>"; - $foo = sscanf("ghost 0xface","%s %x",&$string, &$int); - echo "<br>AFTER : <br> string = $string, int = $int<br>"; - echo " sscan reports : "; - print_value( $foo,""); - echo " conversions <br>"; - - echo "<h3><em><br>Multiple specifiers<br></em></h3>"; - echo "sscanf(\"jabberwocky 1024 0xFF 1.024 644 10\", - \"%s %d %x %f %o %i\", - &\$string,&\$decimal,&\$hex,&\$float,&\$octal,&\$int);<br>"; - echo "<br>BEFORE : <br>"; - echo "Decimal = $decimal, String = $string, Hex = $hex<br>"; - echo "Octal = $octal , Float = $float, Int = $int<br>"; - $foo = sscanf( "jabberwocky 1024 0xFF 1.024 644 10", - "%s %d %x %f %o %i", - &$string,&$decimal,&$hex,&$float,&$octal,&$int); - echo "<br>AFTER :<br>"; - echo "decimal = $decimal, string = $string, hex = $hex<br>"; - echo "octal = $octal , float = $float, int = $int<br>"; - - echo " sscan reports : "; - print_value( $foo,""); - echo " conversions <br>"; - echo "----------------------------------------<br>"; -} - - - -?> -<html> - <head> - <title>Test of sscanf()</title> - </head> - <body> - <strong><h1>Testing sscanf() support in PHP</h1></strong><br> - <?php - if (!function_exists('sscanf')) { - echo "<strong>I'm sorry but sscanf() does not exist !i</strong><br>"; - } else { - simple_tests(); - run_sscanf_test_cases(); - } - ?> - </body> -</html> diff --git a/tests/testswf b/tests/testswf deleted file mode 100644 index e26733237d..0000000000 --- a/tests/testswf +++ /dev/null @@ -1,120 +0,0 @@ -<?php - -$LINEID=1; -$LINEDEPTH=50; -$LINESTEPS=30; - -$CIRCLEID=2; -$CIRCLEDEPT=100; - -/* stop playing */ -function stop() -{ - swf_startdoaction(); - swf_actionStop(); - swf_enddoaction(); -} - -/* play stoping */ -function play() -{ - swf_startdoaction(); - swf_actionPlay(); - swf_enddoaction(); -} - -/* - * demonstrates: - * defining and placing an object. - * - */ -function flipline() -{ - global $LINESTEPS, $LINEID, $LINEDEPTH; - - swf_ortho2(-100.0,100.0,-100.0,100.0); - swf_defineline($LINEID,-60.0,0.0,60.0,0.0,1.2); - swf_mulcolor(1.0,1.0,1.0,1.0); - swf_addcolor(0.0,0.0,0.0,0.0); - for($i=0; $i<$LINESTEPS; $i++) { - $p = $i/($LINESTEPS-1.0); - swf_pushmatrix(); - swf_rotate(60.0*$p,'z'); - swf_translate(20.0+20.0*$p,0.0,0.0); - swf_rotate(120.0*$p,'z'); - swf_placeobject($LINEID, $LINEDEPTH); - swf_popmatrix(); - swf_showframe(); - } - for($i=0; $i<$LINESTEPS; $i++) { - swf_removeobject($LINEDEPTH); - if(($i%4) == 0) - swf_showframe(); - } - swf_showframe(); -} - -/* growblobs follows */ - -$NBLOBS=8; -$BLOBSTEPS=20; - -/* - * demonstrates: - * shape definition - * placing, and modifying objects. - * - */ -function growblobs() -{ - global $NBLOBS, $BLOBSTEPS, $CIRCLEDEPT, $CIRCLEID; - - swf_ortho2(-200.0,200.0,-200.0,200.0); - - swf_startshape($CIRCLEID); - swf_shapefillsolid(0.0,0.0,0.0,1.0); - swf_shapearc(0.0,0.0,300.0,0.0,360.0); - swf_endshape(); - - swf_mulcolor(1.0,1.0,1.0,1.0); - $startframe = swf_getframe(); - for($j=0; $j<$NBLOBS; $j++) { - swf_setframe($startframe+2*$j); - for($i=0; $i<$BLOBSTEPS; $i++) { - $p = $i/($BLOBSTEPS-1.0); - swf_pushmatrix(); - swf_scale($p,$p,$p); - swf_addcolor($p,$p,$p,0.0); - if($i== 0) - swf_placeobject($CIRCLEID,$CIRCLEDEPTH+$j); - else - swf_modifyobject($CIRCLEDEPTH+$j,MOD_COLOR|MOD_MATRIX); - swf_popmatrix(); - swf_showframe(); - } - swf_removeobject($CIRCLEDEPTH+$j); - } - swf_showframe(); -} - -swf_openfile("test.swf",400.0,400.0,20.0,1.0,1.0,1.0); -flipline(); -growblobs(); - -// trytext(); -// makebuttons(); -// stop(); -swf_showframe(); -swf_closefile(); - -// swf_openfile("images.swf",400.0,400.0,20.0,1.0,1.0,1.0); -// showimages(); -// brushstrokes(); -// symboltest(); -// stop(); -// swf_showframe(); -// swf_closefile(); -// fprintf(stderr,"wrote images.swf\n"); - exit(0); - -?> |