ID:               48903
 Updated by:       col...@php.net
 Reported By:      ninzya at inbox dot lv
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Windows XP
 PHP Version:      5.3.0
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

You can't, as usual, use objects as array keys.

Check out SplObjectStorage.


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

[2009-07-13 13:29:35] ninzya at inbox dot lv

Description:
------------
See reproduce code.

Reproduce code:
---------------
<?php

$arr =array();

$arr[function(){return 5;}] ='Stepanov';

var_dump( $arr);

?>

Expected result:
----------------
array(1) {
  [5]=>
  string(8) "Stepanov"
}

Actual result:
--------------
Warning: Illegal offset type in D:\...\index.php on line 5
array(0) {
}


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


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

Reply via email to