summaryrefslogtreecommitdiff
path: root/tests/lang/023-1.inc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/023-1.inc')
-rw-r--r--tests/lang/023-1.inc34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/lang/023-1.inc b/tests/lang/023-1.inc
index 8d52e844c9..153f5d7668 100644
--- a/tests/lang/023-1.inc
+++ b/tests/lang/023-1.inc
@@ -10,11 +10,11 @@
?>
*** Testing assignments and variable aliasing: ***<br>
-<?php
+<?php
/* This test tests assignments to variables using other variables as variable-names */
- $a = "b";
- $$a = "test";
- $$$a = "blah";
+ $a = "b";
+ $$a = "test";
+ $$$a = "blah";
${$$$a}["associative arrays work too"] = "this is nifty";
?>
This should read "blah": <?php echo "$test<br>\n"; ?>
@@ -22,7 +22,7 @@ This should read "this is nifty": <?php echo $blah[$test="associative arrays wor
*************************************************<br>
*** Testing integer operators ***<br>
-<?php
+<?php
/* test just about any operator possible on $i and $j (ints) */
$i = 5;
$j = 3;
@@ -38,7 +38,7 @@ Correct result - 3: <?php echo $j%$i; ?><br>
*********************************<br>
*** Testing real operators ***<br>
-<?php
+<?php
/* test just about any operator possible on $i and $j (floats) */
$i = 5.0;
$j = 3.0;
@@ -55,7 +55,7 @@ Correct result - 3: <?php echo $j%$i; ?><br>
*** Testing if/elseif/else control ***<br>
-<?php
+<?php
/* sick if/elseif/else test by Andi :) */
$a = 5;
if ($a == "4") {
@@ -90,7 +90,7 @@ if ($a == "4") {
*** Seriously nested if's test ***<br>
** spelling correction by kluzz **
-<?php
+<?php
/* yet another sick if/elseif/else test by Zeev */
$i=$j=0;
echo "Only two lines of text should follow:<br>\n";
@@ -98,7 +98,7 @@ if (0) { /* this code is not supposed to be executed */
echo "hmm, this shouldn't be displayed #1<br>\n";
$j++;
if (1) {
- $i
+ $i
+=
$j;
if (0) {
@@ -128,7 +128,7 @@ if (0) { /* this code is not supposed to be executed */
} 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) {
+ if (1) {
$j = ++$i;
if (0) {
$j = $i*2+$j*($i++);
@@ -182,7 +182,7 @@ if (0) { /* this code is not supposed to be executed */
?>
*** C-style else-if's ***<br>
-<?php
+<?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";
@@ -199,7 +199,7 @@ if (0) { /* this code is not supposed to be executed */
*************************<br>
*** WHILE tests ***<br>
-<?php
+<?php
$i=0;
$j=20;
while ($i<(2*$j)) {
@@ -217,7 +217,7 @@ while ($i<(2*$j)) {
*** Nested WHILEs ***<br>
-<?php
+<?php
$arr_len=3;
$i=0;
@@ -253,7 +253,7 @@ while ($i<$arr_len) {
*********************<br>
*** hash test... ***<br>
-<?php
+<?php
/*
$i=0;
@@ -273,7 +273,7 @@ echo "commented out...";
**************************<br>
*** Hash resizing test ***<br>
-<?php
+<?php
$i = 10;
$a = 'b';
while ($i > 0) {
@@ -295,7 +295,7 @@ while ($i > 0) {
*** break/continue test ***<br>
-<?php
+<?php
$i=0;
echo "\$i should go from 0 to 2<br>\n";
@@ -349,7 +349,7 @@ while ($i<5) {
<?php include("023-2.inc"); ?>
********************************<br>
-<?php
+<?php
{
echo "Tests completed.<br>\n"; # testing some PHP style comment...
}