Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54252 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27590 invoked from network); 29 Jul 2011 17:20:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jul 2011 17:20:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=adirkuhn@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=adirkuhn@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.173 as permitted sender) X-PHP-List-Original-Sender: adirkuhn@gmail.com X-Host-Fingerprint: 209.85.215.173 mail-ey0-f173.google.com Received: from [209.85.215.173] ([209.85.215.173:54362] helo=mail-ey0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/32-01298-9EBE23E4 for ; Fri, 29 Jul 2011 13:20:42 -0400 Received: by eyb7 with SMTP id 7so3759603eyb.4 for ; Fri, 29 Jul 2011 10:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=4xXgTXzcKK5BnNSU4kYItUsV9ZtlZYMxoZP9Sr/1AV8=; b=Rv88lk38L8O6BLYymqXHSvsnvdTTmLGyb5bS1TZd01dg6NseLeq5wk3jO2fr4TBCDa yKhcsQAHd3ME5mVicrAiXb4+3W+CnKcIUlNOPvNhx2TueQpWx9p4vkX8QbnTDa5LcWQH xB7or81Mh1u/dbWLUqZ/+etpfalSuOj21ZVKU= Received: by 10.213.16.201 with SMTP id p9mr720825eba.76.1311960037195; Fri, 29 Jul 2011 10:20:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.31.72 with HTTP; Fri, 29 Jul 2011 10:20:17 -0700 (PDT) Date: Fri, 29 Jul 2011 14:20:17 -0300 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=0015174c0eb8fa00d604a9387f3b Subject: c and php operations From: adirkuhn@gmail.com (Adir Kuhn) --0015174c0eb8fa00d604a9387f3b Content-Type: text/plain; charset=ISO-8859-1 Hello guys, while I'm studing some c codes i found this page: http://www.nicksays.co.uk/2009/05/awesome-c-exam-question/ and this code: #include int func (int a, int b) { static int c = 1; return a + b * (c *= -1);} int main () { int a = 2, b = 3; int c = func(a, b); a *= a++; b *= ++b; printf("%d %d %d %d\n", a, b, c, func(a, b));} thats prints: 5 16 -1 21 then I made a similar php script: and for my surprise its prints: 6 16 -1 22 so, somebody know and can explain me wtf happened? Thanks! Adir Kuhn --0015174c0eb8fa00d604a9387f3b--