summaryrefslogtreecommitdiffhomepage
path: root/php.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'php.html.markdown')
-rw-r--r--php.html.markdown6
1 files changed, 5 insertions, 1 deletions
diff --git a/php.html.markdown b/php.html.markdown
index ae636b0a..af4e2f01 100644
--- a/php.html.markdown
+++ b/php.html.markdown
@@ -330,7 +330,11 @@ $function_name(); // will execute the my_function_name() function
Similar to variable functions, functions may be anonymous.
```php
-my_function(function () {
+function my_function($callback) {
+ $callback('My argument');
+}
+
+my_function(function ($my_argument) {
// do something
});