2007-12-25 18:58:49 +08:00
|
|
|
--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"));
|
2007-12-25 18:58:49 +08:00
|
|
|
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\\"));
|
2007-12-25 18:58:49 +08:00
|
|
|
var_dump(is_callable("Test::foo"));
|
2008-12-05 04:12:30 +08:00
|
|
|
var_dump(is_callable("\\Test::foo"));
|
2007-12-25 18:58:49 +08:00
|
|
|
var_dump(is_callable("is_string"));
|
2008-12-05 04:12:30 +08:00
|
|
|
var_dump(is_callable("\\is_string"));
|
2007-12-25 18:58:49 +08:00
|
|
|
--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)
|