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

  • Home
  • SEARCH
  • 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 48605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:18:22+00:00 2026-05-10T16:18:22+00:00

I am told that good developers can spot/utilize the difference between Null and False

  • 0

I am told that good developers can spot/utilize the difference between Null and False and 0 and all the other good ‘nothing’ entities.
What is the difference, specifically in PHP? Does it have something to do with ===?

  • 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. 2026-05-10T16:18:23+00:00Added an answer on May 10, 2026 at 4:18 pm

    It’s language specific, but in PHP :

    Null means "nothing". The var has not been initialized.

    False means "not true in a boolean context". Used to explicitly show you are dealing with logical issues.

    0 is an int. Nothing to do with the rest above, used for mathematics.

    Now, what is tricky, it’s that in dynamic languages like PHP, all of them have a value in a boolean context, which (in PHP) is False.

    If you test it with ==, it’s testing the boolean value, so you will get equality. If you test it with ===, it will test the type, and you will get inequality.

    So why are they useful ?

    Well, look at the strrpos() function. It returns False if it did not find anything, but 0 if it has found something at the beginning of the string!

    <?php // pitfall : if (strrpos("Hello World", "Hello")) {      // never exectuted }  // smart move : if (strrpos("Hello World", "Hello") !== False) {     // that works ! } ?> 

    And of course, if you deal with states, you want to make a difference between the following:

    • DebugMode = False (set to off)
    • DebugMode = True (set to on)
    • DebugMode = Null (not set at all; will lead to hard debugging ;-))
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try java.sql.Date Hopefully this will help you out with the… May 13, 2026 at 12:36 am
  • Editorial Team
    Editorial Team added an answer I think pmg has hit on the actual problem; you've… May 13, 2026 at 12:36 am
  • Editorial Team
    Editorial Team added an answer Well, they released a new version (4.0) with Vista, and… May 13, 2026 at 12:36 am

Related Questions

I have developed an array based implementation of a hashTable with several stock names,
I have been a VB.net developer for a few years now but I am
Our company builds websites and web applications. We are a small firm and our
i have a few developers who constantly put If null checks For example: Run(Order

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.