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
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: khaweronline at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 12:00:02 2026 UTC