Re: [PHP4BETA] breaking compatibility
| From: | Andi Gutmans | Date: | Sat, 17 Apr 1999 10:09:41 +0000 |
| Subject: | Re: [PHP4BETA] breaking compatibility | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-152@lists.php.net to get a copy of this message | ||
OK I changed it back to what it's original behaviour.
We'll have to add a getclassname() function sometime which returns the
class name.
Andi
At 03:18 17/04/99 +0200, Boris Erdmann wrote:
><?php
>
>$o = new foobar;
>print gettype($o);
>
>?>
>
>Echos "object of type foobar". PHP3 echoed "object".
>
>
>All programs
>
><?php
>
>switch gettype($var) {
>
> case "object":
>
> [...]
>
> break;
>}
>?>
>
>will break. Moreover: the new output is ugly to process. One has
>to explode() the result of gettype now, in order to get processable
>data.
>
>A distinct classname() or classtype() function would be better, imo.
>
>
> Boris
>
>--
>PHP 4 Beta
>
>
>
---
Andi Gutmans <andi@zend.com>
ICQ: 1568297
--
PHP 4 Beta