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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:31:43+00:00 2026-06-12T02:31:43+00:00

Note: I don’t think this question has much to do with PHP’s eval .

  • 0

Note: I don’t think this question has much to do with PHP’s eval.

In Tcl, eval takes a list, using the first item as the function (proc) name, and the rest of the items as arguments, e.g.

eval [list foobar arg1 arg2 arg3]

is equivalent to

foobar arg1 arg2 arg3

In PHP, both call_user_func and call_user_func_array require at least two parameters: (1) the function name, and (2) either the arguments or an array of the arguments, respectively.

Is there a similar function in PHP that takes only one parameter?

I wrote my own, as shown below, but I’d prefer a native method.

function call_user_array(array $a) {
    return call_user_func_array(array_shift($a), $a);
}

Thanks in advance for any hints.

P.S. Not sure if “lambda” has anything to do with this but the word comes to mind for some reason: would someone more knowledgeable please remove the tag if it’s not actually relevant, as well as this note? Thanks again!

  • 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-12T02:31:44+00:00Added an answer on June 12, 2026 at 2:31 am

    No, there is nothing built-in to do that. Since it can be implemented in one line (just like you did it) there’s also not much reason to consider including one.

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

Sidebar

Related Questions

Note: I don't think that the I have worded the question the best possibly
NOTE: I don't think this is a duplicate of the billion other questions about
I am reading the Java Hashmap documentation but I don't understand this sentence. Note
Note, this is not a duplicate of .prop() vs .attr() ; that question refers
(Note: This is not a question about what is the best way with code
NOTE: This is a followup to my question here. I have a program that
NOTE: This is an old question and the answers here no longer works (since
Note:I don't mean some theoretical question which don't have any implementation just languages that
I'm running Wordpress with Adrotate - note, this is not a Wordpress question -
NOTE: I'm ultra-newbie on algorithm analysis so don't take any of my affirmations as

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.