Re: PDBPLUS: cannot redefine g()
| From: | Greg Beaver | Date: | Thu, 31 Jul 2003 19:11:57 +0000 |
| Subject: | Re: PDBPLUS: cannot redefine g() | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-19068@lists.php.net to get a copy of this message | ||
Hi Ondrej,
Yes, you should rename G(). This is not great programming practice even if it is legal, the potential for missed typos is huge.
Regards,
Greg
Ondrej Jombik wrote:
PDBPLUS gives me this strange error: ondrej@Apolon:~$ pdbplus.php <br /> <b>Fatal error</b>: Cannot redeclare g() in <b>/home/ondrej/prog/CVS-others/pear/PDBPLUS/class.commands.php</b> on line <b>351</b><br /> ondrej@Apolon:~$ Looking at the code:function g() { global $partial; $this->query($partial . '\\g'); $partial = ''; $this->setPrompt(); }function G() { global $partial; $this->query($partial . '\\G'); $partial = ''; $this->setPrompt(); }I thought that PHP functions are case sensitive. This code works well in PHP/4.2.3 however it does not work in PHP/4.3.2. Should I rename G() to something different? -- _/| Ondrej Jombik - nepto@php.net - http://www.nepto.sk - OJ812-RIPE <_ \ Platon SDG - open source software development - http://platon.sk `\| This message was written with Pine, the fastest IMAP mail client'`