Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP PHP Functions Function Returns and More PHP Variable Functions

Miguel Nunez
Miguel Nunez
3,266 Points

What is a callback in php?

What is the purpose of using callback?

Miguel Nunez
Miguel Nunez
3,266 Points

In your own words with out complicated sources like those links.

3 Answers

Callbacks are callable functions whose name you can pass to another function as a parameter.

Miguel Nunez
Miguel Nunez
3,266 Points

So its a method? or an actual code if so how does it look like?

It's simply passing a function as an argument to another function; a function inside another function.

where is this tut in teamtreehouse ?