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 8053571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:53:32+00:00 2026-06-05T07:53:32+00:00

Possible Duplicate: Interview question: In php, is 123==0123? I am newbie in PHP. I

  • 0

Possible Duplicate:
Interview question: In php, is 123==0123?

I am newbie in PHP. I am trying to store 0123 in a PHP variable while learning PHP but it displays 83 instead of 0123 when I echo the variable. Can anyone give me exact technical reason of that.

Thanks in Advance,
Dhaval

  • 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-06-05T07:53:34+00:00Added an answer on June 5, 2026 at 7:53 am

    You are probably doing something like this

    $var = 0123;
    

    This is an integer and not a string. Sidenote: “0123” is not a number, because no number has a leading 0 except abs($var)<1 or $var == 0. But the leading 0 has a special meaning when used with integers: It is treated as a base-8-integer, which is then converted into base-10

                   0123_8 = 83_10
    1*8^2 + 2*8^1 + 3*8^0 = 8*10^1 + 3*10^0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Easy interview question got harder: given numbers 1..100, find the missing number(s)
Possible Duplicate: What’s the “condition” in C interview question? void main() { if(CONDITION) printf(Hello
Possible Duplicate: Linked list interview question This is an interview question for which I
Possible Duplicate: Display numbers from 1 to 100 without loops or conditions Interview question:
Possible Duplicate: Counting inversions in an array This is an phone interview question :
Possible Duplicate: Determine word size of my processor It is One Interview question today.
Possible Duplicate: Easy interview question got harder: given numbers 1..100, find the missing number(s)
Possible Duplicate: Help with algorithm problem from SPOJ Came across this interview question. Given
Possible Duplicate: Examples of GoF Design Patterns At an interview a while back I
Possible Duplicate: Find integer not occurring twice in an array Accenture interview question -

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.