🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • Aakash Srivastava
    Aakash Srivastava
    5,415 Points

    PHP Closures

    Posted December 23, 2018 1:47pm by Aakash Srivastava
    Aakash Srivastava
    5,415 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    3 Answers

  • Edward Lee
    Edward Lee
    1,805 Points

    Can it be explained why it can't be passed as an argument or use global?

    Posted August 6, 2018 3:35pm by Edward Lee
    Edward Lee
    1,805 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    0 Answers

  • Ken Stone
    Ken Stone
    29,703 Points

    Where is the internal functions video that is mentioned in this video?

    Posted April 30, 2017 7:07pm by Ken Stone
    Ken Stone
    29,703 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    1 Answer

  • Moses Finlay
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Moses Finlay
    Full Stack JavaScript Techdegree Graduate 24,800 Points

    Is there a difference between two these functions?

    Posted April 1, 2017 8:30pm by Moses Finlay
    .a{fill-rule:evenodd;}techdegree seal-36
    Moses Finlay
    Full Stack JavaScript Techdegree Graduate 24,800 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    4 Answers

  • Jordan Olson
    Jordan Olson
    6,155 Points

    Why use 'use' when we can just pass the variable into the actual function?

    Posted February 11, 2016 7:14am by Jordan Olson
    Jordan Olson
    6,155 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    1 Answer

  • Reve Abi khalil
    PLUS
    Reve Abi khalil
    Courses Plus Student 537 Points

    Why don't we use from the first ("") double quotes when we use echo instead of changing it every time we use a variable?

    Posted January 27, 2016 6:33pm by Reve Abi khalil
    Reve Abi khalil
    Courses Plus Student 537 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    2 Answers

  • Afgan Afror
    PLUS
    Afgan Afror
    Courses Plus Student 40 Points

    Difference between USE vs GLOBAL ?

    Posted January 20, 2016 3:02pm by Afgan Afror
    Afgan Afror
    Courses Plus Student 40 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    1 Answer

  • Seth Warner
    Seth Warner
    5,348 Points

    Im sure after going over this a little more ill under stand why to choose "use" over global in certain situations. why?

    Posted September 27, 2015 8:38pm by Seth Warner
    Seth Warner
    5,348 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    0 Answers

  • Boris Vukobrat
    Boris Vukobrat
    851 Points

    Closures have semicolon at end

    Posted September 3, 2015 9:27am by Boris Vukobrat
    Boris Vukobrat
    851 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    1 Answer

  • MELVIN GEORGE
    MELVIN GEORGE
    3,490 Points

    why cant we use closures for named functions?

    Posted July 18, 2015 7:51pm by MELVIN GEORGE
    MELVIN GEORGE
    3,490 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    2 Answers

  • William Twiner
    William Twiner
    2,605 Points

    Couple more questions

    Posted May 15, 2015 7:27pm by William Twiner
    William Twiner
    2,605 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    5 Answers

  • Colby Work
    Colby Work
    20,422 Points

    Why use "use" and not an argument?

    Posted April 16, 2015 9:49pm by Colby Work
    Colby Work
    20,422 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    2 Answers

  • Florios Demosten
    Florios Demosten
    1,617 Points

    global vs use ()

    Posted April 6, 2015 8:13am by Florios Demosten
    Florios Demosten
    1,617 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    0 Answers

  • tuukka uosukainen
    tuukka uosukainen
    22,107 Points

    When to use double and single quotes

    Posted March 24, 2015 5:57am by tuukka uosukainen
    tuukka uosukainen
    22,107 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    3 Answers

  • Eric Moore
    Eric Moore
    4,154 Points

    Variable Functions vs. PHP Closures

    Posted March 16, 2015 11:32pm by Eric Moore
    Eric Moore
    4,154 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    2 Answers

  • Abdullah Althobetey
    Abdullah Althobetey
    18,216 Points

    PHP Closures

    Posted January 1, 2015 5:07pm by Abdullah Althobetey
    Abdullah Althobetey
    18,216 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures

    2 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.