diff options
author | Dmitry Stogov <dmitry@php.net> | 2007-12-25 10:58:49 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2007-12-25 10:58:49 +0000 |
commit | 1ccc6a4f10df6eeef469975d972e6f35ce136cb9 (patch) | |
tree | 8e012c7a22383d9fc0eca041ab630f66f0bb58c8 /Zend/tests/bug43651.phpt | |
parent | dae2a5f2a52b1a072dc53b06997100c0adb8edf2 (diff) | |
download | php-git-1ccc6a4f10df6eeef469975d972e6f35ce136cb9.tar.gz |
Fixed bug #43651 (is_callable() with one or more nonconsecutive colons crashes)
Diffstat (limited to 'Zend/tests/bug43651.phpt')
-rw-r--r-- | Zend/tests/bug43651.phpt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Zend/tests/bug43651.phpt b/Zend/tests/bug43651.phpt new file mode 100644 index 0000000000..bce0601abe --- /dev/null +++ b/Zend/tests/bug43651.phpt @@ -0,0 +1,41 @@ +--TEST-- +Bug #43651 (is_callable() with one or more nonconsecutive colons crashes) +--FILE-- +<?php +class Test { + static function foo() {} +} + +var_dump(is_callable("::")); +var_dump(is_callable(":")); +var_dump(is_callable("x:")); +var_dump(is_callable(":x")); +var_dump(is_callable("x:x")); +var_dump(is_callable("x::")); +var_dump(is_callable("::x")); +var_dump(is_callable("x::x")); +var_dump(is_callable("cd")); +var_dump(is_callable("Test::")); +var_dump(is_callable("::Test")); +var_dump(is_callable("::Test::")); +var_dump(is_callable("Test::foo")); +var_dump(is_callable("::Test::foo")); +var_dump(is_callable("is_string")); +var_dump(is_callable("::is_string")); +--EXPECT-- +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(true) +bool(true) +bool(true) +bool(true) |