Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120755 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 74996 invoked from network); 6 Jul 2023 07:18:52 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Jul 2023 07:18:52 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 349F91804BC for ; Thu, 6 Jul 2023 00:18:49 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 6 Jul 2023 00:18:48 -0700 (PDT) Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-4fba74870abso393569e87.0 for ; Thu, 06 Jul 2023 00:18:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688627926; x=1691219926; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=HTt/kMcCz8qdSNz9+ZjuBzii3VHUSLcMiUnrdR/oSlc=; b=eL0/VgL6huUJ8+l5lTYnTj8RlmJ8wZ0dD1Rsdv31CJofo2+9uLUTGuCbSQyfEtAmdE Cz8PmPVhCwtDNjxSpYsgPRIAy2MaMgHMkiP6soKpIn/CYgN5owyO5iAChtTyUbkt1V2C H31DDmgegSkI2OAvTB/UVi9m3DovyRPV//AGIZ7SKwjfVoz7GG7lvpy6o+e2Cp9yn/ZH ojhc6EK6Wugqy8DM+2+iyBmc6lqhY927Rse/waUn0Y6vrLftOFV1SYNusIOUJWq1iXx9 d+rz2t6qvx98PSDPSeqVTgSYgk0epJE5M4rMqGxRv+rH7xlfFK+D03ynSAJvvjE9DYIM 0VTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688627926; x=1691219926; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HTt/kMcCz8qdSNz9+ZjuBzii3VHUSLcMiUnrdR/oSlc=; b=bfTMNHP/r0cyHKnlAjPN8VJbzy0lCghUK+g+//zVEiP6YwTUd2Dzhui2FnC4yim0Lt +ZtXu05QhQtObInnTb/I+M5kjxRX5gyO7tE5UH51aT2o3bSSB0BMbVx3Tm3HGtj/+WAZ Ag4FJF8W0SlSDy3Dcadh6mxpFm+miHTJadBIHOI6sqDHcn04BCHmELwWVYVKF1MbJDSr Kfy4qq+nLa1sF3GRQ3/KCO/uA574nqBFNHdWURqvHG9Nw0y2esJiJ4rW25KAkUXq/8Kq MLUU/t0UIkT9bJpeKcMgILDVdgEX8x2cMqe30IJO5XAxpwIX32N4qF5e5vWks91pyAT1 9quQ== X-Gm-Message-State: ABy/qLZrFojuB2tkeZqFeBKFU4EZy37c5zY3fBxFdgSOSO56KQFmrp4O HDnilPRJK8bkGABCzNrBNU4ml9Y4TsMPpC5bLui0wDpT X-Google-Smtp-Source: APBJJlEbuxW8vhUc3jdHjRUIjIknIiPw8guRiI2rW7kfcpQ3glebcNbBaCy0Og7xTLAjNwgeakYFP6eLsgbYmSTEXuQ= X-Received: by 2002:a05:6512:3146:b0:4f8:6627:7983 with SMTP id s6-20020a056512314600b004f866277983mr806751lfi.5.1688627926431; Thu, 06 Jul 2023 00:18:46 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6520:4d54:b0:23d:476c:2579 with HTTP; Thu, 6 Jul 2023 00:18:45 -0700 (PDT) In-Reply-To: References: Date: Thu, 6 Jul 2023 17:18:45 +1000 Message-ID: To: internals Content-Type: multipart/alternative; boundary="000000000000b67cf905ffcc53b5" Subject: Re: [PHP-DEV] ??= and function calls From: mickmackusa@gmail.com (mickmackusa) --000000000000b67cf905ffcc53b5 Content-Type: text/plain; charset="UTF-8" I didn't even realize that there was a difference between preincrementation and postincrementation when used in array access. I guess this is because my default preference is preincrementation and also that I probably don't use a lot of incrementation while accessing array data. I held a false belief that the different syntaxes only mattered when echoing. $x = 0; $array1[1] = 43; $array1[++$x] ??= 42; var_dump($x, $array1); echo "\n---\n"; $y = 0; $array2[0] = 43; $array2[$y++] ??= 42; var_dump($y, $array2); Thanks Ilija mickmackusa --000000000000b67cf905ffcc53b5--