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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:30:39+00:00 2026-05-26T00:30:39+00:00

In an app written in PHP (e.g., a social network), let’s say that 10

  • 0

In an app written in PHP (e.g., a social network), let’s say that 10 users (signed-in) are browsing the website.

In PHP code, there is “user” object created to store users data and to pass values to other functions and classes.

Question: When these 10 users go to user.php, which has code to create “user” object, how are these objects stored in memory in PHP? Do they not conflict? Is each one of the “user” objects are uniquely stored in the memory or would one be overwritten by another?

For example, user a visits first so object “user” contains his/her data but when user second visits, the “user” object in memory is overwritten so when first user calls the object, it’s the second users data retrieved.

Or, is it unique?

I want to understand object in PHP as a newbie, please explain it simply because none of the web pages I found regarding OOP explains this.

  • 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-26T00:30:39+00:00Added an answer on May 26, 2026 at 12:30 am

    PHP is a CGI application, that means, it’s being started and terminated on each request.

    • a client sends a request to the web server
    • the server starts PHP and passes the request to it
    • PHP allocates a chunk of memory for your script
    • your script is being executed, all objects it creates are stored in that chunk of memory
    • you script generates some html, this html is sent to the client
    • the memory is being freed and PHP is stopped

    If you have 10 clients requests coming at the same time, 10 copies of php will be started and 10 independent memory chunks will be used. So, no, objects from different requests do not interfere.

    (Note: this explanation is deliberately simplified, there are actually different php setups and persistence options).

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

Sidebar

Related Questions

I've written a web app in PHP and MySQL that permits users to insert
I have written a small chat app that uses mysql + php to facilitate
I have an app written in C# that lies on a network share. When
There is a project written in PHP that is just simply all procedural ...
So I have a web app written in PHP that will run on different
I need to edit a web app written in PHP and HTML. There is
I have written a web app in PHP which makes use of Ajax requests
I have a Linux app (written in C) that allocates large amount of memory
I have an app written in PHP, MySQL, etc. The app has a few
I have an existing app written in PHP (using Kohana framework) and I want

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.