Bug #28641 [Com]: Instance of Interface
| From: | in at highfitjobs dot com | Date: | Fri, 24 Sep 2021 06:44:55 +0000 |
| Subject: | Bug #28641 [Com]: Instance of Interface | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-236800@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=28641&edit=1
ID: 28641
Comment by: in at highfitjobs dot com
Reported by: clemens at gutweiler dot net
Summary: Instance of Interface
Status: Closed
Type: Bug
Package: Class/Object related
Operating System: Linux 2.6.3
PHP Version: 5.0.0RC2
Block user comment: N
Private report: N
New Comment:
https://highfitjobs.com/government-jobs-for-engineers
https://highfitjobs.com/mechanical-engineering-jobs
https://highfitjobs.com/civil-engineering-jobs
https://highfitjobs.com/electrical-engineering-jobs
Thank you so much for sharing. Great step-by-step instructions!
Previous Comments:
------------------------------------------------------------------------
[2004-06-05 17:00:08] helly@php.net
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.
------------------------------------------------------------------------
[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 https://bugs.php.net/bug.php?id=28641&edit=1