|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #318 elseif failure with function calls
Submitted: 1998-04-27 08:38 UTC Modified: 1998-04-27 09:43 UTC
From: mjacob at picture-safe dot de Assigned: rasmus (profile)
Status: Closed Package: Parser error
PHP Version: other OS: Solaris 2.5.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mjacob at picture-safe dot de
New email:
PHP Version: OS:


 [1998-04-27 08:38 UTC] mjacob at picture-safe dot de
In PHP V2.0b12 there is a problem with
calling functions from elseif-statements.


Function func $par (
    $r_val = 1;
    return $r_val;

if (0)
   echo ("men");
elseif (func ("par"))
   echo ("Bingo");
   echo ("Default");

echo ("<BR>r_val=" + func ("par") + ".");

In this example the elseif()-block is
not executed although the function should
return 1. If you change "$r_value=1;return $r_value;"
to "return 1;" the elseif-block is executed.
The only chance is to use not elseif but if.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-27 09:43 UTC] rasmus
2.0b12?  Why are you running such an ancient version?  This bug has
been fixed and all the code rewritten several times since 2.0b12.  Upgrade!
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Oct 01 13:01:24 2023 UTC