xref: /PHP-8.1/Zend/tests/declare_007.phpt (revision 0189585c)
1--TEST--
2Testing declare statement with ticks with callback arguments
3--FILE--
4<?php
5register_tick_function(function (stdClass $object, array $array) {
6    echo "tick: ", get_class($object), " ", count($array), "\n";
7}, new \stdClass(), [1, 2, 3]);
8function foo() { }
9
10declare(ticks=1) {
11
12$statement;
13foo();
14
15}
16?>
17--EXPECT--
18tick: stdClass 3
19tick: stdClass 3
20