function bar () {
var_dump(get_class());
}
- function testNull ()
- {
- var_dump(get_class(null));
- }
}
class foo2 extends foo {
var_dump(get_class($f1));
var_dump(get_class($f2));
-$f1->testNull();
-
echo "Done\n";
?>
--EXPECTF--
bool(false)
string(3) "foo"
string(4) "foo2"
-
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
-bool(false)
Done
{
zval *obj = NULL;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|o", &obj) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|o!", &obj) == FAILURE) {
RETURN_FALSE;
}
Arg value: (type: NULL)
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
+Warning: get_class() called without object from outside a class in %sget_class_variation_001.php on line %d
bool(false)
Arg value: (type: NULL)
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
+Warning: get_class() called without object from outside a class in %sget_class_variation_001.php on line %d
bool(false)
Arg value: 1 (type: boolean)
Arg value: (type: NULL)
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
+Warning: get_class() called without object from outside a class in %sget_class_variation_001.php on line %d
bool(false)
Arg value: (type: NULL)
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
+Warning: get_class() called without object from outside a class in %sget_class_variation_001.php on line %d
bool(false)
Done