Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8199 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59660 invoked by uid 1010); 27 Feb 2004 08:20:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 59634 invoked from network); 27 Feb 2004 08:20:27 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 27 Feb 2004 08:20:27 -0000 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.10/8.12.10) with ESMTP id i1R8KO9b007370; Fri, 27 Feb 2004 09:20:25 +0100 Date: Fri, 27 Feb 2004 09:20:24 +0100 (CET) X-X-Sender: derick@localhost To: John Coggeshall cc: PHP Internals In-Reply-To: <1077855554.2592.1.camel@coogle.localdomain> Message-ID: References: <1077855554.2592.1.camel@coogle.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Bogus Error Message? From: derick@php.net (Derick Rethans) On Thu, 26 Feb 2004, John Coggeshall wrote: > > $reflect = new Reflection_Class("Object"); > > $docs = $reflect->getDocComment(); > if(!empty($docs)) { > echo "Has Docs.\n"; > } > > if(!empty($reflect->getDocComment())) { > echo "Has Docs.\n"; > } > > ?> > > [john@coogle ]$ php test.php > > Fatal error: Can't use method return value in write context in test.php > on line 10 > > Since when is empty() writing anything? Or is there something else here > that I'm not seeing? empty() can only be used on variables, RTFM: http://nl.php.net/empty but I do agree that the message is bogus... Derick