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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:01:40+00:00 2026-05-12T08:01:40+00:00

I was just wondering how the PHP is behaving in the background. Say I

  • 0

I was just wondering how the PHP is behaving in the background.

Say I have a PHP which creates an array and populates it with names.

$names = Array("Anna", "Jackson" .... "Owen");

Then I have a input field which will send the value on every keypress to the PHP, to check for names containing the value.

Will the array be created on every call? I also sort the array before looping through it, so the output will be alphabetical. Will this take up time in the AJAX call?

If the answer is yes, is there some way to go around that, so the array is ready to be looped through on every call?

  • 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-12T08:01:40+00:00Added an answer on May 12, 2026 at 8:01 am

    There’s no difference between an AJAX request and a “normal” http request. So yes, a new php instance will be created for each request. If the time it takes to parse the script(s) is a problem you can use something like APC.
    If those arrays are created at runtime and the time this takes is a problem you might store and share the values between requests in something like memcache

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

Sidebar

Related Questions

Just wondering. Say I have this in a php page <?php if x {
Just wondering if there is anyway to have PHP just run a certain class
I am using PHP and MySQL, i am just wondering which route would be
Just wondering in php, if it was possible to convert a string to a
Just wondering... is there a PHP equivalent to Perl's Taint Mode? I don't think
Just wondering about the performance impact of copying very large php variables. For example
Just wondering how to work out distance between 2 latitude and longitude using PHP
I'm just wondering how I can read a text file in php, I'd like
I'm just wondering how I could display my last 200 mysql entries in php
I'm just wondering how I could remove everything after a certain substring in PHP

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.