Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62702 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75334 invoked from network); 3 Sep 2012 02:43:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Sep 2012 02:43:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.42 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vb0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:42095] helo=mail-vb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 78/FF-17065-75914405 for ; Sun, 02 Sep 2012 22:43:36 -0400 Received: by vbbfs19 with SMTP id fs19so5306229vbb.29 for ; Sun, 02 Sep 2012 19:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=LsbMDy0QgH5YBhk+G5gLoA9prKUPJFSVbJXoKGMlbfs=; b=l0urlSeLADSIASoc+0fpwlRqiwf4noLW0Se8Ayg/tp9EV897MaWNlpC6ZY5zOSnu71 W6nwzXDxL5oiOkuTaBqQybty3MJzScHcXYWCELr9ZYxT8tPw9GQw3hCnCbphJRp2Ww0c FJrG/epp4n5zgK/Gyxs0Psh3ZVI8dMBnoHAhbVPNjEH633YegEa4BIvT7hy/cwPnivWz 7s/bcoshaRugcbSsm0P9f/vYsxa+BhoKcG1AWY+6S14fkK9wYtcfUzYieJXn2AGOv7CM MvmYtOV1J0iolpDBMAbjzy2Rxl6jnFISJ5Fw19hzqwH/xnld4xkQKW5C6hsUTF0dMEqP GTFA== Received: by 10.220.248.72 with SMTP id mf8mr11029321vcb.15.1346640212389; Sun, 02 Sep 2012 19:43:32 -0700 (PDT) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.220.18.15 with HTTP; Sun, 2 Sep 2012 19:43:11 -0700 (PDT) In-Reply-To: <20120902230741.TSGJ23973.aamtaout03-winn.ispmail.ntl.com@p2> References: <20120902230741.TSGJ23973.aamtaout03-winn.ispmail.ntl.com@p2> Date: Mon, 3 Sep 2012 10:43:11 +0800 X-Google-Sender-Auth: IdWeLElcbuOU6X_JoG6o2SOkny8 Message-ID: To: Jared Williams Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Foreach list behaviour From: laruence@php.net (Laruence) Hi: this is expected behavior, like: wrote: > Hi, > > Just looking at the foreach list behaviour and it does this... > > $i = [1, 2, 3]; > foreach($i as list($a, $b)) > var_dump($a, $b); > > Outputs.... > > NULL > NULL > NULL > NULL > NULL > NULL > > There is no test I can see covering this, so cannot tell if its > expected. > > To me, $i does not meet the expected format, so should be some sort of > error happening. > > Jared > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Laruence Xinchen Hui http://www.laruence.com/