1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<?php use kch42\ste\STECore; function test_func(STECore $ste) { $names = array( "foo", "ab_cd", "foo123baz", "x0123", ); foreach ($names as $name) { $ste->register_tag( $name, function ($ste, $params, $sub) use ($name) { return $name; } ); } }