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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:44:29+00:00 2026-06-17T06:44:29+00:00

it seems that these 2 features has something in common, say, invoke a method

  • 0

it seems that these 2 features has something in common, say, invoke a method just using its name in string. what’s the difference? is there anything reflection can do but Variable variables can’t?

even more, what’s the difference between these 2 features’ implementations in the PHP execution engine(VM)

  • 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-17T06:44:30+00:00Added an answer on June 17, 2026 at 6:44 am

    They don’t have anything to do with each other.

    Variable variables let you utilize a variable containing a string to access the contents of a different variable. They are confusing and rarely used in my experience.

    <?php
    $first = 'Bob';
    $last = 'Smith';
    
    $t = 'first';
    echo $t;
    echo $$t;
    
    $t = 'last';
    echo $t;
    echo $$t;
    

    Reflection is a general term used to describe facilities in a language or library that let you discover the structure of a class. This is often useful to framework or component developers who are trying to implement design patterns that work with user supplied classes or have highly generic functionality. They’re also very helpful if you are generating php code, or providing a tool that documents existing code.

    As you can see from the api documentation: http://php.net/manual/en/book.reflection.php this provides you ways to determine at runtime the properties and methods of a class.

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

Sidebar

Related Questions

Ok! I have to say both technology are great. Although there seems that something
It seems that eclipse has always had some flaky auto-complete functionality. I'm now using
It seems that these two operators are pretty much the same - is there
The general consensus these days seems to be that you do not store binary
It seems that there is a guidance that a model should not expose its
I know, I know, its sounds silly, but it seems that there are no
My app has 10 features that are enabled/disabled depending upon which of the 3
I have a method that I call to make web service requests using GET.
It seems that there is a implementation of rope in my /usr/include/c++/4.5.1/ext/rope (and ropeimpl.h
It seems that there are several really fast prime factorization algorithms around (one that

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.