Segfault on ArrayAccess use

From: Date: Fri, 19 Dec 2003 18:37:38 +0000
Subject: Segfault on ArrayAccess use
Groups: php.internals 
Request: Send a blank email to internals+get-6621@lists.php.net to get a copy of this message
Hello internals, The following code produces segfault using snapshot php5-200312191230. <?php class A implements ArrayAccess { private $array = array(); public function offsetExists( $offset ) { return isset( $this->array[ $offset ] ); } public function offsetGet( $offset ) { return $this->array[ $offset ]; } public function offsetSet( $offset, $data ) { $this->array[ $offset ] = $data; } public function offsetUnset( $offset ) { unset( $this->array[ $offset ] ); } } $arr = new A(); $arr[] = 'Segfault here!'; ?> Also when trying to do something like array_keys() on ArrayAccess instance, error message is thrown. Will array functions support ArrayAccess? -- Best regards, Simeon mailto:xi@ngs.ru

« previous php.internals (#6621) next »