php-src/Zend/tests/bug43651.phpt

42 lines
866 B
Plaintext
Raw Normal View History

--TEST--
Bug #43651 (is_callable() with one or more nonconsecutive colons crashes)
--FILE--
<?php
class Test {
static function foo() {}
}
2008-12-05 04:12:30 +08:00
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"));
2008-12-05 04:12:30 +08:00
var_dump(is_callable("Test\\"));
var_dump(is_callable("\\Test"));
var_dump(is_callable("\\Test\\"));
var_dump(is_callable("Test::foo"));
2008-12-05 04:12:30 +08:00
var_dump(is_callable("\\Test::foo"));
var_dump(is_callable("is_string"));
2008-12-05 04:12:30 +08:00
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)