ID:               28641
 Updated by:       [EMAIL PROTECTED]
 Reported By:      clemens at gutweiler dot net
-Status:           Open
+Status:           Closed
 Bug Type:         Class/Object related
 Operating System: Linux 2.6.3
 PHP Version:      5.0.0RC2
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


Previous Comments:
------------------------------------------------------------------------

[2004-06-05 11:25:28] clemens at gutweiler dot net

Description:
------------
Its possible to create an instance of an interface
PHP Version: 5.0.0RC3RC2

Reproduce code:
---------------
php5-1.php:
<?php
        
        class foo {
                public $member = 'value';
        }
        session_start( );
        $_SESSION['foo'] = new foo;
        
?>
<a href="php5-2.php">next</a>


php5-2.php:
<?php
        
        interface foo {
        }
        function __autoload( $name ) {
                var_dump( '__autoload(): '.$name );
        }
        
        session_start( );
        var_dump( $_SESSION );
        
?>

Expected result:
----------------
the following should occur:
- call __autoload()
- if class foo isnt available: display error: Cannot instantiate
interface foo at sesstion_start() or something


Actual result:
--------------
array(1) {
  ["foo"]=>
  object(foo)#1 (1) {
    ["member"]=>
    string(5) "value"
  }
}



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28641&edit=1

Reply via email to