Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127798 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 793621A00BC for ; Mon, 30 Jun 2025 13:41:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1751290794; bh=h2YMwwWU/Buqr5e07CQIkT6RotEUHniABL4hRqTBheA=; h=References:In-Reply-To:From:Date:Subject:To:From; b=SIJiuPF3O3hTZTQu3216RXT1KVbWdS1QsVmbZCIKvI8G58ASiwrfY7K9xyChChNd/ MQVV+FUngEbpgZ7uRH8NOyV6aoiwIwjjxedbyXkpccy79YIHtYmzl/j7LlgMo455sT nasCdbDSxntpxdGskSFPS3lUZ1qgBxk08MnloWyKg4SDJOj6iZTVmcJFmKOe34fNx2 2TBEMqc401DLs5n5a6AnzhiY0EuXfijL++amcXXEzPrdWGv0SUVHCUbytg1RHhu3ED iIHGXTFTvaeFrjfdqaUdPWhd2kLWz4QfdHt0iTyVgxz6dbZDFQLISsEZ9QD70lxjQU B9rkj4avebDcA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0CFD7180047 for ; Mon, 30 Jun 2025 13:39:54 +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-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) (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 ; Mon, 30 Jun 2025 13:39:53 +0000 (UTC) Received: by mail-qv1-f45.google.com with SMTP id 6a1803df08f44-70109af5f70so1592016d6.0 for ; Mon, 30 Jun 2025 06:41:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751290906; x=1751895706; darn=lists.php.net; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=h2YMwwWU/Buqr5e07CQIkT6RotEUHniABL4hRqTBheA=; b=E8bhUV/ACQyldMUyZg7ndDAZnHlLZh1dEAV3vp63S3nspzIk0eUBGsC4SA/jiWcQnr WlzjsBzb9inMgu680ikzrI20aOTGK1PHHPgTy+vGbjB1vN+dbVQeQAKvpzUVWwWfqPnU HdUGwFYhSOLiXf0/Qtl9jAGeOnmX6CbgcC7mael+cBNptVDb5Y7vrCXqMoIOo3yqH53u yC7034Dv3r/okzdZmS9PYB/k0pl1GCdnOc3/WK9Xlk4moBmDwCCwNx1z9MocFvpq9g26 0gEZKkSZUn8IY7vzOUh5DXTaFG8/NuC74JAwVG9P7/h57tnUWAjQVs4eevUpxO/t/PiZ Rl9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751290906; x=1751895706; h=content-transfer-encoding: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=h2YMwwWU/Buqr5e07CQIkT6RotEUHniABL4hRqTBheA=; b=bCpnbSJWszsYmEvMSIEqFvPYgiszPJNIxgakfupyr1NJf7MKbP49VMMYAruDrmCvmZ 4lV1IHWdUkbp2PNAGxLbQi79mIl02QZKhewX3hJOlIkPXdd+3nmGWpc88pJs5epy3z4o 5h4M8Hsd77EpD4NklfYTfIj1qmcrSsB7K+G3bTEnfP7a3fL7Y9TIlR/J/NV0sPIhYDvm zssFoQSSVjhWmw64hWLihLk6RtrlFoa7y+9iBBp694vD69BUFNtLiAjbL3TnTtapU+Ux Etw2DWTG5lju+9UloxmGluMFn+bvjfNbGm+vRZg8JZSdTt1cZ4JIKsA9TPdqGT1ySOpm xCCA== X-Gm-Message-State: AOJu0YxCtjRTqBU3pNHoLU3e7Y1bmxPILHcBBakso02gwTb3bv6aa6Do Ex2r7ka9sEW6jTMrBH9XyALQ0jb6F+dkRddIbC8RruoN6w0W5/EXEy2aK62CFv25rjLzfqqLcX1 MFTe5TSkvpW+QEtzpIzIyG8qZ5Jv0Y2FGFkh2P8BsZA== X-Gm-Gg: ASbGncvNSMtp09X0XZvBu7B5+6kzyXDQeSWVXEufRIGFySmjZXDtjsDm1B+YgfKIwGH /I1Jwfcb2e/q3DPOqx2OtcmoqahtsoMl8eVCXWS2CRWKTUYlfqJvDLafA3s90rvLL+K16TxiJD0 hlf1cHjX6pm5Km6pGJAAEPF0r7sWTnsHARiTC/RwSlIMm18Pmtja6DghGFNv8G2nKESd3WGpXto xlbBw== X-Google-Smtp-Source: AGHT+IF8o/crctV9E0ar4PfJxOTq4CiGZAqwi5gcBx6V5zRKo5kbPQPD9fXlF4dRX3Tkc9dzBaJgvKEVMWA6jaTKfQo= X-Received: by 2002:a05:6214:caf:b0:6fd:7508:9c04 with SMTP id 6a1803df08f44-70002ee7e20mr187713696d6.20.1751290906567; Mon, 30 Jun 2025 06:41:46 -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: Mon, 30 Jun 2025 15:41:35 +0200 X-Gm-Features: Ac12FXxJ0nVpzQ0WS0oEn0Sro4U-fnwK9dQpQOtJaWYsXGigpixCCNfJh-50yhc Message-ID: Subject: =?UTF-8?Q?Re=3A_=5BPHP=2DDEV=5D_Request_for_RFC_Karma_=E2=80=93_khaledalamxy?= =?UTF-8?Q?z?= To: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi Khaled On Mon, Jun 30, 2025 at 1:03=E2=80=AFAM Khaled Alam wrote: > > I=E2=80=99d like to request RFC karma to create a new proposal titled "Fa= il-Fast Assertion Operator (=3D>!)". > > $name =3D>! die("Missing name"); > This is equivalent to: > if (!$name) { > die("Missing name"); > } As mentioned by the other responses, given that throw is an expression you can already achieve this through various operators: // Throw is $name is null $name ?? throw new Exception(); // Throw if $name is empty $name ?: throw new Exception(); // Throw if $name is falsy $name || throw new Exception(); $name or throw new Exception(); // Throw if $name is truthy $name && throw new Exception(); $name and throw new Exception(); It's not clear in what way your proposal is different. Hence, I'm pausing the granting of RFC karma until these details are clarified. Cheers