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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:52:27+00:00 2026-06-08T10:52:27+00:00

From the Classic ASP world, there was that issue of context switching. Context switching

  • 0

From the Classic ASP world, there was that issue of context switching. Context switching is you open PHP tags, you write a little bit of a php code, then you close the tags, you go on with a little bit of HTML and go back to PHP and keep doing these switches quite frequently. In ASP, this style of programming is not recommended there we are advised to minimize it as much as we can.

In other words, instead of writing code like this in ASP

My name is <%response.write myName %> and I am <%response.write myage %> years of age.

we are recommended to write code as follows;

<%response.write "My name is " & myName & " and I am " & myage & " years of age."%>

With the latter, ASP.DLL spends less time parsing the script.

My question is does this concept/issue/worry apply in the PHP world or not?

  • 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-08T10:52:29+00:00Added an answer on June 8, 2026 at 10:52 am

    Well, that’s not how PHP works at least. There is no context switching, the file is fully PHP, with anything outside the <?php ?> tags amounting to one static echo statement.

    The amount of parsing time taken is pretty much the same and completely irrelevant if you are using op code cache.

    You may use parsekit to compile different files and see what kind of op codes are generated.

    So this:

    <?php echo "hi"; ?>
    <?php echo "hi"; ?>
    <?php echo "hi"; ?>
    <html>
    

    Is exactly the same as:

    <?php
    echo "hi";
    echo "hi";
    echo "hi";
    echo "<html>";
    ?>
    

    Note that the newlines in the former example are not output, even though they are outside php tags.

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

Sidebar

Related Questions

Today I'm trying to learn PHP, from Classic ASP. I'm trying to write a
I am coming from the django world to maintain a fairly complicated classic asp
From another question I recently posted, it seems that Classic ASP might not be
I'm having an issue debugging a Classic ASP application from Visual Studio. When I
I have a classic asp page from which I open a popup page in
Probably sounds a bit stupid but I'm getting confused moving from Classic ASP to
Let's say I have some Classic ASP pages that produce all output via Response.Write.
I currently converted my website from classic asp to ASP.NET MVC, I'll be putting
Is it possible to call Server.Execute with a .NET .aspx page from classic ASP?
I'm trying to send an contact enquiry email from a legacy classic asp script

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.