php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12407 if else statement correct in 4.0.5 but not 4.0.6
Submitted: 2001-07-26 14:40 UTC Modified: 2002-06-18 06:31 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: zheng at sfsu dot edu Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.3.0-dev OS: win2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zheng at sfsu dot edu
New email:
PHP Version: OS:

 

 [2001-07-26 14:40 UTC] zheng at sfsu dot edu
the script below runs correctly in 4.0.5 but there is "parse error" in 4.0.6. It seems that you can't break if else into two parts.

<?php
if  (1==1)
echo 1;
?>
<?
else
echo 0;
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-26 14:44 UTC] andy@php.net
reproduced.

If you put the if and else statement between the same <? ?>
tags, it works fine.
 [2002-06-16 15:29 UTC] jason at mercuryboard dot com
Reproduced in 4.2.1
 [2002-06-18 06:31 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 09:01:28 2025 UTC