Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124450 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 3E4CB1A00B7 for ; Tue, 16 Jul 2024 23:14:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1721171775; bh=0N88vxdPcOh7Oy26ZQYLye5rNIH+Zabp30xkawMuEcA=; h=Date:To:From:Subject:From; b=SiRnkTnRWMjX+8W+F4wFHY+TcJ33SY186HKiI2l3AmV2HDX2ewYQpLZAzyemDif7n dUbzY1YLtX+3T1EjHeqTG9hR75U0hS220ECML7fDRhE4XHauABRxqnv1Mx3UHTJRh7 +ccrwLzvaGV/J3tgeE6+Mgu7BVTCRrgRY2/OXlwGgMN2goRIhC78u0aUXr+fPztkXi GoPbnxCa7AtBRpf6LBkr4uOaP7tN5yu2eLPD1L19Y8h+FfEfq6W9y82NMHcqhkOc+d uRKHIEXOlueF3FPKMjRt2t3IU5QK9Utn/FR3YjfPC3W5mEatDtLHbcs0GQgd5aGXuy Rs06cQhnH8x3g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CFA6E18006E for ; Tue, 16 Jul 2024 23:16:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 16 Jul 2024 23:16:14 +0000 (UTC) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-42679f33fefso42366105e9.2 for ; Tue, 16 Jul 2024 16:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scriptfusion-com.20230601.gappssmtp.com; s=20230601; t=1721171683; x=1721776483; darn=lists.php.net; h=content-transfer-encoding:subject:from:content-language:to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=ZQb+UvI9OBcY0Ja6va7wJvKdsoCMEyYurv8VJpf8FpM=; b=eYtoZEMFcZSZTBskJ0IV5RF5TqLTrjszdN42wiUPAHOOsBtQBWqCSw9p1xGoYCmkhK 5S8b+nr6UhjF8nSh/58WnSG9rdrljIhYCum3YNDPoD4lxmOPl5UCNDN7PzV2BpJEhIlx /uqH17awJNxuexazqTXGTvbswIj2kgZBuatW8DiAf//4HpftaDn3rUCHwOL85sZBMsbq jpoeOqf6jJ5OUQQvV30RTGf8m0f1LDRyfcnUnVu0vjEQ/QsDeHFafqEV3COLq+YqdIut 2iFwAEKkxdv9HoR9vpXrxy8NeRF0c5w0vErZmYpmG4FtH+DGCJQMTJVTuoudmKpM1+dP ubIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721171683; x=1721776483; h=content-transfer-encoding:subject:from:content-language:to :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ZQb+UvI9OBcY0Ja6va7wJvKdsoCMEyYurv8VJpf8FpM=; b=rnSR28jflDmHQ0gU1VvDAbu/+G9qBlCxNAuUgovBamA4P/Gz9UPPD76pEzcHiYQ1YP y1EPvXkGC0FvBqKoOTOZJnh3+y8OgTggwOuK+aJ5Oyv5E5SM5JrMdNXvrCNSFJ78ba27 P7fjs6aSkqBTUT2nAfilJorP2wt5LdNiCLdUcP8DvcPtWpvY8sUXfty4UIZj8GEFVgUC SR+47+HdbGNAWY25SLbQba+ibjafirUC8R8d2zPGw2pJn7XdIpIIyClpP9AdlCFi4r6o o/A0AK9izj151mM+cw6Pyk0tmj2sN0dycygIv55OJD/mjHSL5m8xBRvGFgBsdaHxbyik L7xA== X-Gm-Message-State: AOJu0YyvswxCHbshM0EZfcSKB+88EwobIE35a/Htt7hL25+syWoICAwx rfzX8Qdabrd/eSaKJCI0oaiKV9naf2HKGFY7VSQqP+NRr8SQtXkyyyRXv0yHudr4AOIfkQstIhQ 9xD0= X-Google-Smtp-Source: AGHT+IF3z3XHYjHw4Buh/qO+jHoSh4iFcHnrYyedgpy6oNoP7kmheMUDk1VobWBWCZbinaZSM/i0mg== X-Received: by 2002:a05:600c:470e:b0:426:6314:3336 with SMTP id 5b1f17b1804b1-427ba725da2mr24177955e9.36.1721171683371; Tue, 16 Jul 2024 16:14:43 -0700 (PDT) Received: from ?IPV6:2a01:4b00:bf09:5101:103e:4d31:4a2d:3028? ([2a01:4b00:bf09:5101:103e:4d31:4a2d:3028]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-427bb9988f6sm26092625e9.1.2024.07.16.16.14.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Jul 2024 16:14:42 -0700 (PDT) Message-ID: <5bdbffef-4954-415d-9dae-4c9bd4ba0f22@scriptfusion.com> Date: Wed, 17 Jul 2024 00:14:41 +0100 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: PHP Internals List Content-Language: en-GB Subject: [PHP-DEV] array_reduce callback key Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit From: bilge@scriptfusion.com (Bilge) Hi Internals, I just ran into a case where I needed the array key in an array_reduce() callback, but I can't access it :( So I wrote a PR to fix it: https://github.com/php/php-src/pull/14986 What do you think? Does this need an RFC? Cheers, Bilge