Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128327 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 lists.php.net (Postfix) with ESMTPS id BCFD81A00BC for ; Thu, 31 Jul 2025 06:51:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1753944568; bh=f/stnh1/Xc3+5BtDBThy/skanchf4Lu4PK5sdDU2Q0I=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NXZxQdzeg2/DlWppMVZ1YQHExnWxOSMLGPDmupnAvn/64un8IJQckLdf5rorSII3H JCfgxUZJ9bBKoy9Ov1y2lNftXziVYBtOZZw/Za5MLRwSbdAHb3oLLoePkoJoVRrSPP VdrTEaoOTxXF098So2pAoPwrHUO3WgXKD2+ZRzgg7aIXPB9BVukNCBpyc7Z3MrhWhC he4hKyxIBjHjOGufrkB6+v9RCg78n/OZb3tHqkJ6cK0xKBJXmUvkNoaKkLjdIdAVWP d3pOdbkme1s2vxBGwJFKnNBfASFSyw5EdHYdCJYZzFhrqHVSLL816CeA1EtJVfZwqV 0cXc3cnWxcK5A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4F671180081 for ; Thu, 31 Jul 2025 06:49:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 ; Thu, 31 Jul 2025 06:49:23 +0000 (UTC) Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-61571192ba5so802875a12.2 for ; Wed, 30 Jul 2025 23:51:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753944664; x=1754549464; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=f/stnh1/Xc3+5BtDBThy/skanchf4Lu4PK5sdDU2Q0I=; b=ii4pHwcu15KcERYhBGu1POzPMAhbQYA6DgFiOwU3S1eq6esESz2ZwXnpZz0F16V4T+ 2U2mK4dT5Uz91+TVIgueeWb7BgwxMTZejVhiPcoPeMGGW97FlPzPtOD0mmySuShsT8Oi yOU7wyaDe2RcyWY9PnJG8mlibi7JsXzIp3/Cbfuj15qdaxbOgNSMPzpVEcq4OwyvjfaO BQVGgySe3Srd95NuD4S4VILlCjMl1didk4tSquSXe9+4QpJNPomBHvePukn3LCofxxWp AMtsYp0XQJKhdbkp2WKsJSE+K1QQv2ad9aD/cL5EV45jhjxKYr6j4p4NxEM82FFAilyr If0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753944664; x=1754549464; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f/stnh1/Xc3+5BtDBThy/skanchf4Lu4PK5sdDU2Q0I=; b=nU9M/syZlXCGeM03adD+NQ5Ca+7ct/gngD+JNfVJw5sW9xmIM9CYw+yHS9VcjaRrlz CW/e/Fx9kgEIAMRGMxuPKjbIAv/GtSwbYaS/FYuUzhpq23JmFXTolCFfPTS7fCBInxu/ lh/F6VWy/O9Hx16ikiytR5UrwzLoTr4v6JBaXHf41565FUWP99L2XGStEHxJ169SzwUO 9S8g6dOwm9xTXR2VhuT+ji2Ztiiv8PpqzRdhamwVS3vyQvjr23Y0weYlSsGnuyDVaa5t lysuYzDUUR7zhE8W2+kcpDUlZmyZ86W/NUMopW88Nb0hsD4d1H6mFbcBiJmAahqmgHjS wrxA== X-Forwarded-Encrypted: i=1; AJvYcCX+gl2Wyyf61wZ2PpUEUL9kVqzhCggfMjIkkZmKNp2GrcCHrnE4iXuJYw6PdY1O0sRFrezzKjhI0CU=@lists.php.net X-Gm-Message-State: AOJu0YwMPDpdYd6yxFg1PMhA3o0UJg5TjQ3SIOxgDHQWvvLBLdteujtf 62XpiOUveZPRwM2fkdEW6DLP7xt4J1iGMMqntUHPqnfgibvu+vQybUNZB61qY/7mQcEcO4kgQRy 6LkvJqHTodrmxs43//GowRT47pbc3WAU= X-Gm-Gg: ASbGnctuHyrlTyDDiq6SHv6MX6FT7iivwMYT6RcmZsBFg6G/3Uw3nLKn6CHB+MqNMKy EvzwkdBYRJn1LGSdtJ4BcUORN3c6Vcxtj3kz0KmwHO6vdTeCJDmAdjNCuYgLS4o1VNvu4pwZjBA GsQ9FKFdkikKmQtd0ChEp7y89W2ShR582H0L/E1lw9YTLH+GC1zlvag+pYv33k2AP8m5hXMvZCR tN1pCsyhoHJEbuY+p4EihOoMA/YyERRebmr6sfXELyoCUuir9ns X-Google-Smtp-Source: AGHT+IEmhZLPVg3VKGl7A0J2kDVzi015jNwnyPezIouXpf0192ATZJUsX3XMkd/CBcietCc1gFW3akBkL3TKRWeIXTQ= X-Received: by 2002:a50:baab:0:b0:612:b552:5a36 with SMTP id 4fb4d7f45d1cf-61586ee7e4amr5094478a12.8.1753944663726; Wed, 30 Jul 2025 23:51:03 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 31 Jul 2025 08:50:52 +0200 X-Gm-Features: Ac12FXyvIZMIBlKn-PmZx8GJ3t_2ZjuQCaGjgc-toJcp1SPWLa01T6sBddfZDSE Message-ID: Subject: Re: [PHP-DEV] [RFC] Optional Catch Block Body To: Mihail Liahimov <91liahim@gmail.com> Cc: Ayesh Karunaratne , PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: alex.daubois+php@gmail.com (Alexandre Daubois) > Of course, empty catch blocks are bad practice in most cases. But this pa= rticular proposal is not intended to encourage these bad practices. I'm jus= t suggesting that you don't have to write an extra boiler plate at the synt= ax level in situations where it's necessary. From what I can tell, it's very rare to have empty catch blocks, and even more being done rightfully. I'd be very suspicious if I came across such code. I think the extra boilerplate is actually a good thing, showing the explicit intent to not catch the error. I get that the proposal is not intended to encourage such a thing, but I agree with Ayesh: it would definitely will.