ID:               48903
 User updated by:  ninzya at inbox dot lv
 Reported By:      ninzya at inbox dot lv
 Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Windows XP
 PHP Version:      5.3.0
 New Comment:

Yep, my typo, just figured out. Incorrectly used lambdas.


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

[2009-07-13 13:34:24] col...@php.net

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.

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

[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