Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121547 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96465 invoked from network); 31 Oct 2023 16:08:45 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 31 Oct 2023 16:08:45 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 06F14180087 for ; Tue, 31 Oct 2023 09:08:45 -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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 31 Oct 2023 09:08:44 -0700 (PDT) Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-9d267605ceeso433574566b.2 for ; Tue, 31 Oct 2023 09:08:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=grokability.com; s=google; t=1698768522; x=1699373322; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=ct6Oaku4hoR73SA1RwQE/yexqPxRqQLUJvK3dRfodAk=; b=L3CTKY/yuUkIgjTtp2pWOoMchoRGvTQzM5JT2A8c3xa3wTXMTut3cAzWFgaDzgoh2Z ICFZKFbPnOz0hb+qeGxBAm4Fs7tPcE+c+LMVlyEACkDoezEYQ54xy4Joofpn24sOTzBK S9BftBaGeY2gBj60y5mQdye6WDAAJva+MmoaW2kdoXi6cAVcGtFv3Soq2zgDPExlFnFE zaxDQIySakcqaF3FA7L/+fR3ECrucAeZ379mk/RiQpZgcSQsZJgLW8GusBazXygo63PX hNSj7Wiu4Q32r/LmeLTnXTzxg9LWGOCXgGRP1iyBNK+klagJq+qDhlIUneXwXAY1RUBW Ewfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698768522; x=1699373322; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ct6Oaku4hoR73SA1RwQE/yexqPxRqQLUJvK3dRfodAk=; b=RnSjHwosP3QwxhK2te8++9h6L+5cLru8IKo7lKrIPabVh2o6AfYLzZrHF+w+gNXjOg OHqllHVxepuoalP2x/9aKrIwBMOPVFjyvcyF0eeLwapYb2xHCPX7SXuyCZZ/KIP9ZTJR cyRXN1AYxQHIDgUF3EQ47aT788gUjA/B73Xr/FO8baz+Ufu8lZSvAKG0o6BEsS6wIDrx 5wOEldn7fdrQkTglAiMz/Smz+jaIQ53qcabbz+dNY3sVSOiAXkcqT4/EDkygVDDEdSMG GmoKKhrIJgeogky7OCG4xuuDYWxf6pun4qSuTd0DUGC/V3HRftLcxDBD+QS0rRluK9Xj qCHQ== X-Gm-Message-State: AOJu0YycRn885qvICMfJ0nQUUoGpSW2QI2HKB6qrH4XH6HGQGM/gwqGX VyjmtPBN2xA3qpuBmcHUbv15XY79a2aoBgLlC0VxOiMaSnidKwl8KWVUQW5Y X-Google-Smtp-Source: AGHT+IE5h04zDG1w7u+2ZIUJ8srb3UsnqVJBXj7aODhGRMVqLpcTC+PX32RSNOndt5cE3WyqmU1fSEli4yjgU7qLudI= X-Received: by 2002:a17:907:3f1f:b0:9ae:4878:1172 with SMTP id hq31-20020a1709073f1f00b009ae48781172mr10894021ejc.7.1698768522432; Tue, 31 Oct 2023 09:08:42 -0700 (PDT) MIME-Version: 1.0 Reply-To: Brady Wetherington Date: Tue, 31 Oct 2023 16:08:31 +0000 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: New RFC : empty() function From: internals@lists.php.net ("Brady Wetherington via internals") > I have posted a new RFC at this link https://wiki.php.net/rfc/empty_function > where I suggested some improvements to the standard built-in empty() > function and provided a number of examples. Is your "is_empty()" function equivalent to something like: function is_empty($param = null) { return empty($param) && $param !== false && $param !== 0 && $param !== 0.0; } If so, that might actually be kinda nice? I was looking for something like that the other day. Regardless, I wouldn't do the BC-break; I'd be more inclined to (very begrudgingly) leave empty() and warn against its use, and have is_empty() as a new thing. Maybe for some future deprecation or removal? I also do like the idea that someone else mentioned here about being able to possibly start to get away from @'ing variables with a solution like this. -B.