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

🤑 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

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

  • 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
    • Showing results for:
    • PHP
    • PHP Functions
    • Function Returns and More
    • PHP Closures
    • Close
  • Aakash Srivastava
    Aakash Srivastava
    5,415 Points

    PHP Closures

    Posted on Dec 23, 2018 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 on Aug 6, 2018 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 on Apr 30, 2017 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 on Apr 1, 2017 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 on Feb 11, 2016 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 on Jan 27, 2016 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 on Jan 20, 2016 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 on Sep 27, 2015 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 on Sep 3, 2015 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 on Jul 18, 2015 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 on May 15, 2015 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 on Apr 16, 2015 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 on Apr 6, 2015 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 on Mar 24, 2015 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 on Mar 16, 2015 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 on Jan 1, 2015 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.