Re: PHP 5 Beta 2 RC1

From: Date: Mon, 27 Oct 2003 07:32:56 +0000
Subject: Re: PHP 5 Beta 2 RC1
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-5033@lists.php.net to get a copy of this message
On Monday, October 27, 2003, at 02:22 AM, Marcus BXrger wrote:
Hello George, intersting code :-) You can also avoid that by using $arr[(string)$book] = 1; instead of $arr["$book"] = 1; marcus
Yeah, I know I can avoid it, but I shouldn't have to. In more complex examples it also seems to cause SIGBUS errors on OSX. An ickier example would be something like this <params>
        <description>Home Page HTTP Check</description>
        <url>http://www.schlossnagle.org/~george</url>
        <timeout>30</timeout>
        <frequency>900</frequency
</params> parsed by something like this public function __construct($params) {
    foreach($params as $k => $v) {
      $k = "$k";
      $this->$k = "$v";
    }
} That has really high WTF factor.

« previous php.internals (#5033) next »