php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #70581 Else If Syntax
Submitted: 2015-09-25 13:45 UTC Modified: 2015-09-25 22:25 UTC
From: khaweronline at gmail dot com Assigned: leigh (profile)
Status: Not a bug Package: *General Issues
PHP Version: Irrelevant OS: All OS
Private report: No CVE-ID: None
 [2015-09-25 13:45 UTC] khaweronline at gmail dot com
Description:
------------
Syntax of "Else If" in all major languages like C, C++, C#, Javascript, Java etc is "Else If", but in PHP it is "Elseif", WHY?

Current Syntax:

if (expression)
  {
    Block of statements;
  }
elseif(expression)
  {
    Block of statements;
  }
else
  {
    Block of statements;
  }

Expected Syntax:

if (expression)
  {
    Block of statements;
  }
else if(expression) // Else if instead of Elseif
  {
    Block of statements;
  }
else
  {
    Block of statements;
  }


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-25 14:08 UTC] leigh@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: leigh
 [2015-09-25 14:08 UTC] leigh@php.net
PHP supports both "else if" and "elseif". Nothing to do here.
 [2015-09-25 22:25 UTC] requinix@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 16:01:31 2024 UTC