Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 527825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:55:25+00:00 2026-05-13T08:55:25+00:00

When I was learning PHP, I read somewhere that you should always use the

  • 0

When I was learning PHP, I read somewhere that you should always use the upper case versions of booleans, TRUE and FALSE, because the “normal” lowercase versions, true and false, weren’t “safe” to use.

It’s now been many years, and every PHP script I’ve written uses the uppercase version. Now, though, I am questioning that, as I have seen plenty of PHP written with the lowercase version (i.e. Zend Framework).

Is/Was there ever a reason to use the uppercase version, or is it perfectly OK to use the lowercase?

edit: Forgot to mention that this applies to NULL and null as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:55:26+00:00Added an answer on May 13, 2026 at 8:55 am

    The official PHP manual says:

    To specify a bool literal, use the
    constants true or false. Both are
    case-insensitive.

    So yeah, true === TRUE and false === FALSE.

    Personally, however, I prefer TRUE over true and FALSE over false for readability reasons. It’s the same reason for my preference on using OR over or or ||, and on using AND over and or &&.

    The PSR-2 standard requires true, false and null to be in lower case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 298k
  • Answers 298k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can call it as you might a model if… May 13, 2026 at 7:37 pm
  • Editorial Team
    Editorial Team added an answer It is not a valid uri. Only certain characters are… May 13, 2026 at 7:37 pm
  • Editorial Team
    Editorial Team added an answer jRails works for Rails 2, overriding various functions to get… May 13, 2026 at 7:37 pm

Related Questions

When I was programming a Form Validator in PHP, when creating new methods, I
Thanks to everyone in advance. I've been doing some research on error handling and
I'm new to java development, and was happy to see how much easier the
This problem has been kicking my butt for a few days now. I have
Back when I was learning HTML, I loved how easy it to build pages

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.