diff options
author | Felipe Pena <felipe@php.net> | 2008-05-11 03:15:13 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2008-05-11 03:15:13 +0000 |
commit | 3d7013045b0be30f94f608356d65b07ec6e616c3 (patch) | |
tree | 5485cba97c401496caca29bbfd24035b70c33172 /Zend/tests/anonymous_func_001.phpt | |
parent | c28ebf6a9205f2c9da80d0f1ba025c9694e437d4 (diff) | |
download | php-git-3d7013045b0be30f94f608356d65b07ec6e616c3.tar.gz |
- New tests
Diffstat (limited to 'Zend/tests/anonymous_func_001.phpt')
-rw-r--r-- | Zend/tests/anonymous_func_001.phpt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Zend/tests/anonymous_func_001.phpt b/Zend/tests/anonymous_func_001.phpt new file mode 100644 index 0000000000..644a7f49ad --- /dev/null +++ b/Zend/tests/anonymous_func_001.phpt @@ -0,0 +1,35 @@ +--TEST-- +Testing calls to anonymous function +--FILE-- +<?php + +for ($i = 0; $i < 10; $i++) { + $a = create_function('', 'return '. $i .';'); + var_dump($a()); + + $b = "\0lambda_". ($i + 1); + var_dump($b()); +} + +?> +--EXPECT-- +int(0) +int(0) +int(1) +int(1) +int(2) +int(2) +int(3) +int(3) +int(4) +int(4) +int(5) +int(5) +int(6) +int(6) +int(7) +int(7) +int(8) +int(8) +int(9) +int(9) |