PHP 4.0 Bug #7852 Updated: failure in 'alternate if'
| From: | hholzgra@php.net | Date: | Fri, 17 Nov 2000 09:54:20 +0000 |
| Subject: | PHP 4.0 Bug #7852 Updated: failure in 'alternate if' | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-38399@lists.php.net to get a copy of this message | ||
ID: 7852
Updated by: hholzgra
Reported By: kapn@kapn.net
Status: Closed
Bug Type: *General Issues
Assigned To:
Comments:
see http://php.net/version4/incompatibilities.php,
topic #2
about break and continue
the same is true for all the other control structures as
all their controling components have to be in the same
'parsing unit' aka file
Previous Comments:
---------------------------------------------------------------------------
[2000-11-16 13:52:28] kapn@kapn.net
The following file will return a parse error at the 'endif;'
file1:
<!-- testif.html -->
<html>
<head>
<title>
alternative if syntax test
</title
</head>
<body>
<?php
include("testif.seg")
?>
<H2>testing alternate if</H2>
<?php
endif;
?>
</body>
</html>
file2:
<!-- testif.seg -->
<?php
if ($debug):
?>
<H2> Debug = <?php echo $debug ?></H2>
<?php
else:
?>
But if I cut and paste the inclusion into the file instead
it works fine.
<!-- testif2.html -->
<html>
<head>
<title>
alternative if syntax test
</title
</head>
<body>
<!-- testif.seg -->
<?php
if ($debug):
?>
<H2> Debug = <?php echo $debug ?></H2>
<?php
else:
?>
<H2>testing alternate if</H2>
<?php
endif;
?>
</body>
</html>
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7852