From:             ahayes at wcg dot net dot au
Operating system: Fedora Core 5
PHP version:      5.1.2
PHP Bug Type:     Class/Object related
Bug description:  overloading not working with arrays not stored as arrays

Description:
------------
Please note I would like to submit bug 33941 as it still occurs within PHP
5.1.2 however it is stated at the mentioned bug report that it fixed as of
PHP 5.0.4.

Please see: http://bugs.php.net/bug.php?id=33941

dmitry states initially that the bug is not fixable @ 5 Aug 2005 12:06pm
UTC however then later it states that the bug has been fixed.

Can you please supply information as to whether this bug has been fixed or
not?

Thanks
Alex

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

class ex {
  public function __get($prop) {
    return unserialize($this->fields[$prop]);
  }

  public function __set($prop, $value) {
    $this->fields[$prop] = serialize($value);
  }

  private $fields;
}

$obj = new ex;
$obj->prop = array(4 => 'pear');
$obj->prop[5] = 'apple';

var_dump($obj->prop);
?>

Expected result:
----------------
array(1) {
  [4]=>
  string(4) "pear"
  [5]=>
  string(5) "apple"
}

Actual result:
--------------
array(1) {
  [4]=>
  string(4) "pear"
}

-- 
Edit bug report at http://bugs.php.net/?id=37217&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37217&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=37217&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37217&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37217&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37217&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37217&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37217&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37217&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37217&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37217&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37217&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37217&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37217&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37217&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37217&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37217&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37217&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37217&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37217&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37217&r=mysqlcfg

Reply via email to