File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
reflection /
tests /
bug52854.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:01 2012 UTC (13 years, 1 month ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Bug #52854: ReflectionClass::newInstanceArgs does not work for classes without constructors
--FILE--
<?php
class Test {
}
$c = new ReflectionClass('Test');
var_dump(new Test);
var_dump(new Test());
var_dump($c->newInstance());
var_dump($c->newInstanceArgs(array()));
try {
var_dump($c->newInstanceArgs(array(1)));
} catch(ReflectionException $e) {
echo $e->getMessage()."\n";
}
?>
--EXPECTF--
object(Test)#%d (0) {
}
object(Test)#%d (0) {
}
object(Test)#%d (0) {
}
object(Test)#%d (0) {
}
Class Test does not have a constructor, so you cannot pass any constructor arguments
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>