Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108669 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 87260 invoked from network); 19 Feb 2020 17:04:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Feb 2020 17:04:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1869F180540 for ; Wed, 19 Feb 2020 07:20:14 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 19 Feb 2020 07:20:13 -0800 (PST) Received: by mail-oi1-f172.google.com with SMTP id p125so24112329oif.10 for ; Wed, 19 Feb 2020 07:20:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mgeRR2J9qpEXl2fu9yD3BWxAPYH7t00EuBJj5eCDTto=; b=CNTMpXG8SWAhb0p3mjWy8NiRJmZvADnsE70iwNupL2jBu/QrxEfN15vM/JHziMIoqF OpHAYQAJ8+r6wPRMj/zr8uFGqW9cZtDr4AYADW/cC6gXbdjI9dht4aelk4qmV43whIKD JvST4GoCUtGahKese9MOFB6bCKDHqKwXrSF5RRJFN1a++ulDEfr/e2usV5RgQQAItuSa Kw4zYMeIv6LmjDVYA0nzNdQdVbMX/6/+Ug7uQbXtUVY3/NpQuI1RGvJ8HFwYUhsZdseZ 8f2L3TPEl3/mGK5eR3u4Iv+/K5vTlv1IOFnVZvc+qn0sacOfgoLOaIwfzKm7EUSQOYMk d02w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mgeRR2J9qpEXl2fu9yD3BWxAPYH7t00EuBJj5eCDTto=; b=K+jiNJ/rQm/ycnzcz68AHs2xICkQwLnui1qWPz3sC6ppoti05YJFtHiWF9yXFnY/IC nWStaj+Zt7hIe7QIvmOjEsiOOIAvmUilu+OJZBqLqmp2W5oXJ0GvT4gtwqUJOrH6D4xl RSBIAD16ufwAIKfsFnFjJz7ykcwEaLcKTOx8MIlMsW+zFq8O+lSkxKZlliy6kC7Ej1oG /2rvx75mOiRCd72kLY2HexBaiUSh/2noZs0B5kmhBZluGjtdB83AD/ROIErc1VXUVcHj DI3NcS5HD07mVPMh80+1kDFouV3lVtk4GWeZBLApKQrU1v23G4ppuq/qG6dyQ1rRova5 zg4Q== X-Gm-Message-State: APjAAAUraNsRbyT7cmE+L7wcMmwy9mr+9jj6kvWO9g/wU/zDq29RIEab dwS/z8KJWgkG0n40oZoqqZX7LtomGJ3nzKMUoo8= X-Google-Smtp-Source: APXvYqzGDHjEBkiGNQepvJ9PepyE8GDHuLz5rS8401na2B6K1YWoVfK05rYkji3hhS89hlFHcybx9qSDFBtYdimjOB4= X-Received: by 2002:a54:4085:: with SMTP id i5mr4937188oii.17.1582125612960; Wed, 19 Feb 2020 07:20:12 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 19 Feb 2020 12:20:00 -0300 Message-ID: To: Nico Oelgart Cc: PHP Internals Content-Type: multipart/alternative; boundary="000000000000268ec6059eef5310" Subject: Re: [PHP-DEV] New PCRE function From: david.proweb@gmail.com (David Rodrigues) --000000000000268ec6059eef5310 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Maybe you can set all this messages as lowercase? That way we can use it more easily. If we need the first letter in capital letters we can use `ucfirst()`, because the opposite is more complicated (a `strtolower()` would "break" the "JIT" message, for example). Atenciosamente, David Rodrigues Em qua., 19 de fev. de 2020 =C3=A0s 11:37, Nico Oelgart escreveu: > Hi Internals, > > I've submitted a small PR proposing a new PCRE function that > returns a human-friendly string representation of the last error. > > https://github.com/php/php-src/pull/5185 > > Currently there's only preg_last_error() which returns error codes, > which isn't really helpful. Most comments in the documentation are > about converting those to something more user friendly. > > https://www.php.net/preg_last_error#usernotes > > Besides, most extensions provide multiple functions for both > use-cases natively, such as: > > - json (json_last_error / json_last_error_msg) > - socket (socket_last_error / socket_strerror) > - sqlite (sqlite_last_error / sqlite_error_string) > - ldap (ldap_errno / ldap_error) > - etc... > > So I think it makes sense for this function to exist. > > Any thoughts? > > Thank you! > --000000000000268ec6059eef5310--