Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126440 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 BAD7E1A00BC for ; Tue, 18 Feb 2025 10:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1739874185; bh=+dSZ479f8lPeNAVQhnncxlV4Dd9WV+bRWKT3qKUe/vM=; h=Date:Subject:To:References:From:In-Reply-To:From; b=La40xzkK5IySIEONxNvcqYa1p9cTJw2XjF3YCdw71JivtzrBREpM0EkkPrKf65VEx NyabWxVbD4Za4X6zlBEEomsfZ3MECLsLMapKfwfwMSt8TVAIBAGFq1wyP0wLnopsTN nsGAg2VI9M1ZLBPvCInj5zpP/AQsJhPZxfMX/TLJO41PmPIyDbn5li3OzfNFSC6pUW 0V63cMGRiClFYE6ZRcPffORMEVaOm5y497VQjsSTBsXZe8vNFHfVH0Uc308AHRz3rE gQ/PActGJRWpA2PqIcqF4wHCtEbUEPnnz0EGSQCeBpjp/c6qycS0XhAJcmPhBNa6Qn PwrFXoYuFySRw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D97B5180072 for ; Tue, 18 Feb 2025 10:23:04 +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=-1.9 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,URIBL_SBL_A autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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, 18 Feb 2025 10:23:04 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-38f2c4382d1so2229880f8f.0 for ; Tue, 18 Feb 2025 02:25:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seld.be; s=google; t=1739874344; x=1740479144; darn=lists.php.net; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=dFf4tFkGoWjLe5DFJX4q5V1AcYaiyhyf/AGv5ieVoK8=; b=kQ5zGhi94kFA4dLcyhyT4sas8DbFAuCcN0DPPJu8zAvxf/kI9YNOYi078lSbcZRRTe WlAZ0PgcQKxqdrVWHhFT72l7xQ+O33BhupnSEn4sE4O/6Ybqpr413Hz+lFpxT5FNiaoD yRkzV7CwoHBDC+a9kxxl1ZeL6lAlbzGt0yLdgiH1tdln5clV7hhQTJ6uYsZDFEay0ikX F/Qqkp2L+d07M3W/W6C5fTwPFlgyJxg8suKhkTx73aOVkMmkrymoD1h5RpB0JA2eODRj 3XGhTr8siMu7XPgbDI9w1Rzl1PA3IYlo4yS9+Mpa/yQb88iH+x4jgK4emOwRg94nMIxJ jhVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739874344; x=1740479144; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dFf4tFkGoWjLe5DFJX4q5V1AcYaiyhyf/AGv5ieVoK8=; b=s2g6YLS540TKGV5dm7FqQZjlzdof9yCcwH8VjHfLV2YgFppq3C3RJmTwdfOyO4K2KS dJefCFNHBOZFsryOISy2VmP+iUpQxFaltC1Jbyz9MIptBKF2SLHc+d/HALKJeGJV4nwf 1mlm6+T0Aiv/e0V+LP1JO+ESMSr4yrUNIL7zkgrbCNF5Y2M3VjPdQ9cPmCYTTuYc5mRw xyTfl7mlxQoCnLK0Gqsf01D/pZHi8H79HhWSOkc1DMytrClzX895N9yY9GRYcx8sWubK P9F2LnCMmnfGr2HkI5mbc0s5LwxcxDwFQtfSSr5MYCgsJzLDlBJAQYeFTG1opQ2F1RNZ TbqA== X-Forwarded-Encrypted: i=1; AJvYcCU7MKfML7A5T7oMMctvwd3PBGl0jurL0FeUdHXWMeZlYJ/PqhrAWgLDQ3wctK2MOiViMCSj86OMdMA=@lists.php.net X-Gm-Message-State: AOJu0YzgEjKNYz/YiMVUJuosctkMxBeb4h7BW2RAa1rzlxVRZogQcu/X 6QMInqGh5H/9ZBpI9auA04jBu2DzOgY8xf0XQbR7QprAzjASN4DMjUrVFpKoKH8= X-Gm-Gg: ASbGncviSNDkuzPQ1WSuSYFFxOJGlOfFQCJNZ+RYkD9rLcYYXu8YufSBAXHnE3RdrR1 zL6/MPnw1eNpCvzpnFVze5VK7VLArDbtapPcn/+FboSmFZmrhvNp2AQJtAKsYPuLCvXSFYCRF82 MpmOzjkgU4RjVcldjOrSCf9Xa1pj8Jr7yYx+NpBbqy84uMfQiWzWMJ0SCIgjjFC2RHfBzETPac+ 8xln895R3r7BepNtSYPAxksFHBqrctzwsWb1q0vb6+WEFWkzz6+fqE9mLm+2Tl7sR++M9T9u1Iy UGF3Ht4oGeThC48BENVgIzk1m6KVCnpsrXKKap+fhp5SlFSHgRPAph27Wns= X-Google-Smtp-Source: AGHT+IGdV7NcasdKeW2u3bfMXn6gi2Tne3gTpsEsGXwx+8Uo7HCLLx+XjvikoDKfT4bXQxALgtBK0w== X-Received: by 2002:a5d:6d0a:0:b0:38d:e363:494b with SMTP id ffacd0b85a97d-38f24cfa3f1mr23293990f8f.8.1739874344584; Tue, 18 Feb 2025 02:25:44 -0800 (PST) Received: from ?IPV6:2a02:168:4b6e:0:a926:7dfa:cabe:bcdf? ([2a02:168:4b6e:0:a926:7dfa:cabe:bcdf]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-439922141a5sm22445425e9.2.2025.02.18.02.25.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Feb 2025 02:25:43 -0800 (PST) Message-ID: <6104a104-b616-41a5-a56e-30dafc7f8a88@seld.be> Date: Tue, 18 Feb 2025 11:25:42 +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 Subject: Re: [PHP-DEV] [RFC] Add get_error_handler(), get_exception_handler() functions To: Arnaud Le Blanc , PHP internals References: Content-Language: fr In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit From: j.boggiano@seld.be (Jordi Boggiano) On 11.02.2025 14:18, Arnaud Le Blanc wrote: > At the moment, there is no direct way to fetch the currently > registered error or exception handlers. Users who need to inspect > these handlers must resort to a workaround that temporarily sets a new > handler and then immediately restores the previous one: > > $current_error_handler = set_error_handler('valid_callback'); > restore_error_handler(); > > This feels hackish and is error-prone. Sounds good to me, straightforward clean-up of a weird API. Best, Jordi -- Jordi Boggiano @seldaek - https://seld.be