Skip to content

Commit 9403d54

Browse files
author
Arthur
committed
Missing function and method definitions in Example #1 for register_tick_function()
1 parent e6e9c11 commit 9403d54

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

reference/funchand/functions/register-tick-function.xml

+12
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@
5959
<?php
6060
declare(ticks=1);
6161
62+
// Callback function
63+
function my_function($param) {
64+
echo "Tick callback function called with param: $param\n";
65+
}
66+
67+
// Class with a method
68+
class my_class {
69+
public function my_method($param) {
70+
echo "Tick callback method called with param: $param\n";
71+
}
72+
}
73+
6274
// using a function as the callback
6375
register_tick_function('my_function', true);
6476

0 commit comments

Comments
 (0)