diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2020-04-28 19:29:41 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2020-04-28 19:29:41 +0200 |
commit | 2d26169b367af60cbc03d417c09918f50aa3b882 (patch) | |
tree | b27542d3ecc6dd02fbb768297b2a097014e35d7f /tests/test_tagname/code.php | |
parent | bfd4763b4f831ed9eccbdd4717c98b7d95999d2e (diff) | |
download | ste-2d26169b367af60cbc03d417c09918f50aa3b882.tar.gz ste-2d26169b367af60cbc03d417c09918f50aa3b882.tar.bz2 ste-2d26169b367af60cbc03d417c09918f50aa3b882.zip |
Fix parser stumbling over "0" in names
PHPs type juggling strikes again :(
Diffstat (limited to 'tests/test_tagname/code.php')
-rw-r--r-- | tests/test_tagname/code.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_tagname/code.php b/tests/test_tagname/code.php new file mode 100644 index 0000000..6001358 --- /dev/null +++ b/tests/test_tagname/code.php @@ -0,0 +1,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; } + ); + } + +} |