php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #55490
Patch ReflectionClass_newInstanceWithoutConstructor revision 2011-08-25 13:26 UTC by sebastian@php.net
revision 2011-08-25 09:39 UTC by sebastian@php.net
revision 2011-08-25 09:27 UTC by sebastian@php.net
revision 2011-08-25 09:24 UTC by sebastian@php.net

Patch ReflectionClass_newInstanceWithoutConstructor for Reflection related Bug #55490

Patch version 2011-08-25 09:27 UTC

Return to Bug #55490 | Download this patch
This patch is obsolete

Obsoleted by patches:

This patch renders other patches obsolete

Obsolete patches:

Patch Revisions: 2011-08-25 13:26 UTC | 2011-08-25 09:39 UTC | 2011-08-25 09:27 UTC | 2011-08-25 09:24 UTC

Developer: sebastian@php.net


 Index: ext/reflection/tests/ReflectionClass_newInstanceWithoutConstructor.phpt
 ===================================================================
 --- ext/reflection/tests/ReflectionClass_newInstanceWithoutConstructor.phpt	(revision 0)
 +++ ext/reflection/tests/ReflectionClass_newInstanceWithoutConstructor.phpt	(revision 0)
 @@ -0,0 +1,19 @@
 +--TEST--
 +ReflectionClass::newInstanceWithoutConstructor()
 +--CREDITS--
 +Sebastian Bergmann <sebastian@php.net>
 +--FILE--
 +<?php
 +class Foo
 +{
 +    public function __construct()
 +    {
 +        print __METHOD__;
 +    }
 +}
 +
 +$class = new ReflectionClass('Foo');
 +var_dump($class->newInstanceWithoutConstructor());
 +--EXPECTF--
 +object(Foo)#%d (0) {
 +}
 
 Property changes on: ext/reflection/tests/ReflectionClass_newInstanceWithoutConstructor.phpt
 ___________________________________________________________________
 Added: svn:keywords
    + Id Rev Revision
 Added: svn:eol-style
    + native
 
  Index: ext/reflection/tests/ReflectionClass_toString_001.phpt
  ===================================================================
  --- ext/reflection/tests/ReflectionClass_toString_001.phpt	(revision 315465)
  +++ ext/reflection/tests/ReflectionClass_toString_001.phpt	(working copy)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 13:01:29 2024 UTC