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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:45:00+00:00 2026-05-29T05:45:00+00:00

In manual there is create_function function and you can pass result from that function

  • 0

In manual there is create_function function and you can pass result from that function to array_map, I thought that that is the only way to have something like anonymous functions and closures, but then I found that I can just put function like in javascript

array_map(function($a) {
    return $a + 1;
}, array(1, 2, 3, 4, 5));

In which version of php I can do this? Was this always there?

  • 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-29T05:45:01+00:00Added an answer on May 29, 2026 at 5:45 am

    Closures (anonymous functions) were added in PHP 5.3.0, including the use clause.


    Then since PHP 5.4.0 the static keyword is supported in front of it to denote a static function.

    And as of PHP 7.4.0 arrow functions (RFC) as a more concise syntax.

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

Sidebar

Related Questions

Is there a manual for cross-compiling a C++ application from Linux to Windows? Just
Is there a manual way to call a COM object in the GAC in
Is there an online reference manual I can query which contains details of LoadRunner
Is there any way to control and manual specification for start of teaser ?.
I was wondering if there's a way (even a manual one) to setup an
I have a function that fills a part of the bitmap created by imagecreatetruecolor($h,$w)
Is there an FTP browser hiding away in NetBeans 6.1? The help manual doesn't
Is there a .dll version of the inclued extension for PHP ? The manual's
In the Quickbooks SDK Manual, there is a section called "Using ReceivePayment for Credit
In manual it said that InnoDB has row-level locking, so why if I select

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.