Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48638 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78950 invoked from network); 4 Jun 2010 01:20:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jun 2010 01:20:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=jonwage@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jonwage@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: jonwage@gmail.com X-Host-Fingerprint: 74.125.82.170 mail-wy0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:64874] helo=mail-wy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/8C-07323-DE4580C4 for ; Thu, 03 Jun 2010 21:20:46 -0400 Received: by wya21 with SMTP id 21so543005wya.29 for ; Thu, 03 Jun 2010 18:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=yLw+QE3S6v72G3btKZCWAhl8e+DiHy42TAoGMefClDM=; b=TDvoYkqenFxpS7Xo8/TTp1amrbfc+uiMKXRwAUSbti41KWku1OnUK8r/MJcVfh44Xx Gfrm1Iijsh67/KTW4hi9j5HZOW14U6GNVWV6MR8imj6XhlHC26du2moGuCDJLG6kVssb O1dyhCdL659FdOJZfTrqhH5c98c9Caxb2uA2o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=Z6JLGhdFafXxqKf/yem8wXxcsg7l6bTqtQHCE4XCjYKcyxFiv8KO2Jbz7EJrY4dB2v wqOP+Kvau1egt1H+p+HDEiHXtmTbTbf59idhxLF17uzI66Cp1Pc+K5/Ow2+tT6qDdhv3 EqQDUd1AlszzURSd96OGu7NlwP+fd/biI4aiE= Received: by 10.216.88.145 with SMTP id a17mr1697127wef.53.1275614443199; Thu, 03 Jun 2010 18:20:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.232.195 with HTTP; Thu, 3 Jun 2010 18:20:23 -0700 (PDT) In-Reply-To: References: Date: Thu, 3 Jun 2010 21:20:23 -0400 Message-ID: To: Tig Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=0016e6d7ef85c1de9304882a2176 Subject: Re: [PHP-DEV] Suggestion: echo function(var)[0]; From: jonwage@gmail.com (Jonathan Wage) --0016e6d7ef85c1de9304882a2176 Content-Type: text/plain; charset=ISO-8859-1 Hi, I've always wondered the same thing too. Would be a nice improvement. - Jon On Thu, Jun 3, 2010 at 9:12 PM, Tig wrote: > Would be at all possible to implement this kind of shortcut? > > echo function(var)[0]; > > For example, to print the height of an image: > echo getimagesize('./path/to/image')[1]; > ?> > > Sure, if you want more than one of the returned array points, this > would not be very efficient, however when you do only need one, it > would be a lot nicer than: > > $tmp = getimagesize('./path/to/image'); > echo $tmp[1]; > ?> > > Anyway, just an idea. > > -Tig > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Jonathan H. Wage (+1 415 992 5468) Open Source Software Developer & Evangelist sensiolabs.com | jwage.com | doctrine-project.org | symfony-project.org You should follow me on Twitter: http://www.twitter.com/jwage You can contact Jonathan about Doctrine, Symfony and Open-Source or for training, consulting, application development, or business related questions at jonathan.wage@sensio.com --0016e6d7ef85c1de9304882a2176--