Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130543 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 0DC871A00BC for ; Fri, 3 Apr 2026 14:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1775228296; bh=9fZTBDXgLMpFL7Rlh6iWptLVu71AKijaJ0er7mafNNk=; h=References:In-Reply-To:From:Date:Subject:To:From; b=PhCD2OwW/Q2OHvsoUr/axODdxqJyWxb36PcY1ycQa9DeOnxqZKEtDqjZUtvcPM9GL RRex3iHfU9w0F8XbpiJjakE23E2mN/rUH3gxfOPl2c93ACP3Iiyz9e8se/3wNRGN8e F/pE9fKJYHpoS9l0GZEYTZgTPrY+1unP0sKYvg5amIZoAgZDYL0koEg+Ry23gt8rbd aaVbMAF/mDAuvOcXDYGflynmY+NFfeL8IXjpKUnvp1+jOuhx2282rlyzDuMP7vjN+K VBna48BenDjuka+x8e0oDWm9b5I5g2QZh1hSRWfoy01pmKAOQdSvRZqhMa+wcuDyim qaxHIqMWdvNpQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2F4741801D5 for ; Fri, 3 Apr 2026 14:58:15 +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=1.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FORGED_GMAIL_RCVD,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: No X-Envelope-From: Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 ; Fri, 3 Apr 2026 14:58:14 +0000 (UTC) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-43d02a71526so1214995f8f.3 for ; Fri, 03 Apr 2026 07:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775228289; cv=none; d=google.com; s=arc-20240605; b=VubuZxrxgsOz3KAoAHMA0KR9iZQ5yu13F3J6r51CsFJ3Y45lRVotpPQkd5X2MkIwRQ BUZeTEqDlmYJH7vYypKzRu0tYZn7NECv4vyNihy7HRT3TqDTZZashM+pdk1bPbqhgbm7 cJB7PTlAwGeX93OhUbtcin4yYuzNfiaOH5przj2K95b6vWu4bxRiQrQyzlP3iu2lJMzN anw9mpOUfPY+OHM9jbYOmYDaqp5dF/KRmokWheHRgWOerMrhZ+OGvCUMoB2b2dMjHwtV fcyMyJPUoFpddvCr7niKivZXmLrqABOU23fZ4nOnDKPx6TlUfCDTpFxNnslPEXG16eyE DruQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=DtRYFikCSuSS2h4mqw5RbNgRceCVwaRNlP5Qx+Yor5Q=; fh=RnZ+4KjfdZdxwVfzmjFoBvUAaJ227RJecqE9MM9tvfQ=; b=TO3Sfk54fXX1BlTjK5T38w6OblbCI3eeOdcWieQVvOrSTSnxpJZDFAu36DqpoOCdHJ j+WdTIRnKC1T89rrhW8UCt0HbMfAtoA7t+bMdpfSQeFf33qJTZ6VXUqjLKF7pGPdKIil zYnU/demhjywcUVtg0RuH5j2+9zVTBxTPRdSgzYOe/L9h1GqYV+QbYRAV3xZxNmPofNB TM/EGlFaanysMcZQM5hwdEmMmBYGpTV6DuLmKuG6YMD2NlX+wNBXSALzwm96S0muB3K3 y82EJ2PIu0aSGkyCDCRndz6Ur9T5uxigqA8ldopKbApWjmUm5D/A3iPR0xF77O7oRTt6 YxJA==; darn=lists.php.net ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775228289; x=1775833089; 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=DtRYFikCSuSS2h4mqw5RbNgRceCVwaRNlP5Qx+Yor5Q=; b=K717J+O55Eo7Tx1FHW8SFoSgnu/koCyzW655dLbwbSvxkjFDB9uZxjsHj1NVOvHD8j tq2t4TdWW9o1+iesT36n245jBMBE//sRt5mMm1gJBzm9/AMKJb21JQpTxaIkM3CmSQCd RMMCZE0FnTqrtZEqB4xQwNRXdBNTLaO/qVxTAUM1XvDEGaKLJclfgBvcyqLnN7qiUiuS /awLTHHilUphG1rKMIBollTq34wErPmQ1sP7tBcFtcNP0Tw5JhdbiEd0SV2TxKdA/IYo YORp9eg4iu3+frQdYx8a71FXyISkSyUrCtEwEnzLnlRpSKlxurYusXyJc6rQgj5DNnbO 2Djw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775228289; x=1775833089; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=DtRYFikCSuSS2h4mqw5RbNgRceCVwaRNlP5Qx+Yor5Q=; b=iu5qGQXizQqMnmnAc/EnoHLqPG0kYSRy+n8NHEfymuZZNm7sld0jJnXodcHKDhv1f4 JclroxbQVXjbA4hQREaIVGasYElPlLO8+MZlOXamYYSIaLF1pDxZbdD8GiNUfJKnWe9e ZjkYy/JAgeLcqOm5gW8G6KuWrj9Jn+FDmoeYXIXyMdwsEfhyr/Nf5ZUseFaXuMkvUz+s 42XOHiyHrxDTUtP/OyzEzrAJ2q4KnXe7vBsXIPTdg5Ddjnv2+4fF8EvnjjDeHQdD65cy yTGUQnbmoboZDRnyQPWvNLSBtdg4AUN8FYj1KT//iI8aV0gpRCkynrpRsPpswYhrL3WD D48g== X-Gm-Message-State: AOJu0Ywajs5FBoalRjspzOp14evc/UJ59fwLKC5Z9XjEeyi0R/ahUIJf WPH8weCV12hLU/C1G8nkSlGsDjjH1WYloz4i0EfvA70kBuj5BmNK3uGu0eTUZ32fbjgNz8LPm91 tDQlhqa+kQhA7X4Eg247Ho/I1sYKfeFUgzN4= X-Gm-Gg: AeBDietVr4eH7kQ8FnBumtdGogCQt/NX+Sc64/23iM0UZYSEPvGn3WHWGCse+kLSL1A 4E7mDSTbSmrf+fhS5Eg8abR2Ydr0MjL54fHwDvwYg5LZTNYjMXzrZcc9v52MmtzvoS16UMHVlr2 zQJpSa2+4SotqyW75znSPuvkwPpCgW4xToopGNjixDoD2QSIBoodXvPUS+olo8rp0g/LCicWADr +vPrJtCuiqivOLkRO+g9x8mxl6ct+9EDBYhaoKg3w1BdqZ7ndf8oIYk36M3g9mf5F5JgqJ/0r4k u0bujVjEZjpuJPaGI9HrOLJymhRXS3s9zpk= X-Received: by 2002:a5d:588d:0:b0:43c:fbcd:4b65 with SMTP id ffacd0b85a97d-43d2930fdaemr5653225f8f.50.1775228288460; Fri, 03 Apr 2026 07:58:08 -0700 (PDT) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <69C279A1.5040405@adviesenzo.nl> In-Reply-To: Date: Fri, 3 Apr 2026 23:57:57 +0900 X-Gm-Features: AQROBzDzie_yvYir8yM0a7ANZycFaMHMQA5Xkl4NmMOaMGzEIpDVRkJpfw09-U8 Message-ID: Subject: Re: [PHP-DEV][RFC][UNDER DISCUSSION] Oniguruma maintenance end and future of mbregex(End of mbregex) To: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: youkidearitai@gmail.com (youkidearitai) 2026=E5=B9=B43=E6=9C=8826=E6=97=A5(=E6=9C=A8) 1:03 youkidearitai : > > 2026=E5=B9=B43=E6=9C=8824=E6=97=A5(=E7=81=AB) 20:46 Juliette Reinders Fol= mer > : > > > > On 23-3-2026 1:34, youkidearitai wrote: > > > > Hi, Internals > > > > I decide deprecate mbregex in 8.6 and drop in 9.0. > > So I would like to go to Under Discussion phase. > > https://wiki.php.net/rfc/eol-oniguruma > > https://github.com/php/php-src/pull/21490 > > > > > > Thank you for writing this RFC. I don't have a strong opinion either wa= y. I fully understand that maintaining the Oniguruma library, while it was = abandoned by the original project is a huge and unenviable task. > > > > Having said that, I am very curious what Ruby will be using going forwa= rd and if PHP could adopt a similar solution. > > I also wonder if there are no other "blessed" forks of the Oniguruma li= brary to which PHP could switch. > > I believe this should be investigated and the results of this investiga= tion should be added to the RFC to (potentially) strengthen the case for th= e current proposal, or, depending on the findings, it could be that the cur= rent proposal could be adjusted based on what this investigation throws up. > > > > Secondly, I believe the RFC would benefit from a more detailed section = about what PHP devs can do to mitigate the deprecation. > > For example, if the only expected text encoding is UTF-8, people can us= e `preg_*()` functions with the `u` modifier instead of the `mb_ereg*()` fu= nctions. > > > > I also think it is important to mention that the Symfony Mbstring[1] po= lyfill package does **NOT** polyfill the MB regex functionality, so cannot = be used as a replacement/alternative. > > > > With this in mind, I also believe the impact analysis in the RFC should= be expanded as the MbString extension is widely used. > > > > To support this, I've created a branch in the PHPCompatibility package = [2] specifically for this deprecation and I have run the relevant checks ov= er the Packagist Top 4000 (as of yesterday). > > > > I've posted the used ruleset and the full results as a gist. > > https://gist.github.com/jrfnl/bd0f66f1c185930427db4f093babf214 > > > > Summary of findings: > > > > PHP CODE SNIFFER VIOLATION SOURCE SUMMARY > > -----------------------------------------------------------------------= -------------------- > > SOURCE = COUNT > > -----------------------------------------------------------------------= -------------------- > > PHPCompatibility.FunctionUse.RemovedFunctions.mb_splitDeprecated = 30 > > PHPCompatibility.FunctionUse.RemovedFunctions.mb_regex_encodingDeprecat= ed 25 > > PHPCompatibility.FunctionUse.RemovedFunctions.mb_eregi_replaceDeprecate= d 20 > > PHPCompatibility.FunctionUse.RemovedFunctions.mb_ereg_replaceDeprecated= 18 > > PHPCompatibility.FunctionUse.RemovedFunctions.mb_ereg_matchDeprecated = 13 > > PHPCompatibility.FunctionUse.RemovedFunctions.mb_ereg_search_initDeprec= ated 10 > > PHPCompatibility.FunctionUse.RemovedFunctions.mb_ereg_search_regsDeprec= ated 9 > > PHPCompatibility.FunctionUse.RemovedFunctions.mb_ereg_replace_callbackD= eprecated 6 > > PHPCompatibility.FunctionUse.RemovedFunctions.mb_ereg_search_getregsDep= recated 5 > > PHPCompatibility.FunctionUse.RemovedFunctions.mb_eregDeprecated = 4 > > PHPCompatibility.FunctionUse.RemovedFunctions.mb_ereg_search_setposDepr= ecated 4 > > PHPCompatibility.FunctionUse.RemovedFunctions.mb_eregiDeprecated = 2 > > PHPCompatibility.FunctionUse.RemovedFunctions.mb_ereg_search_posDepreca= ted 1 > > -----------------------------------------------------------------------= -------------------- > > A TOTAL OF 147 SNIFF VIOLATIONS WERE FOUND IN 13 SOURCES > > -----------------------------------------------------------------------= -------------------- > > > > So, 147 occurances in the Packagist top 4000 in total. > > > > While this is lower than I would have expected, it should be remembered= that most distributed packages will default to/require UTF-8 encoding and = that code handling non-UTF8 encodings - and therefore needing the Mb regex = functionality - is mostly found in proprietary packages. > > > > The PIE extension would help those packages. > > > > Another potential alternative for those packages would be to convert al= l their data and code to a UTF-8 base, which will be a humongous project fo= r most (and that deserves a mention in the RFC). > > > > Hope this helps. > > > > Smile, > > Juliette > > > > > > 1: https://symfony.com/packages/polyfill-mbstring > > 2: https://github.com/PHPCompatibility/PHPCompatibility/commit/47ba8b69= 1f82d13dcfe496549c1110d250e18a8c > > 3: https://gist.github.com/jrfnl/bd0f66f1c185930427db4f093babf214 > > Hi, Juliette > > Thank you very much for your gist. > I saw your gist, seems like depends mbregex(Oniguruma). > > > Having said that, I am very curious what Ruby will be using going forwa= rd and if PHP could adopt a similar solution. > > I also wonder if there are no other "blessed" forks of the Oniguruma li= brary to which PHP could switch. > > I believe this should be investigated and the results of this investiga= tion should be added to the RFC to (potentially) strengthen the case for th= e current proposal, or, depending on the findings, it could be that the cur= rent proposal could be adjusted based on what this investigation throws up. > > Indeed, There is a Onigmo in > Ruby(https://github.com/ruby/ruby/blob/master/regexec.c) that fork > from Oniguruma. > There are Onigmo and Oniguruma differences. > > I wrote your feedback to RFC. > And I quoted your gist result. Please let me know if there is any problem= . > Thank you again. > > Regards > Yuya > > -- > --------------------------- > Yuya Hamada (tekimen) > - https://tekitoh-memdhoi.info > - https://github.com/youkidearitai > ----------------------------- Hi, Internals I would like to "Voting" phase at next week if there is no any concern. Next week, re-remind email then go to "Voting" phase at next friday(2026-04= -10). If any comment, Feel free to comment. Regards Yuya --=20 --------------------------- Yuya Hamada (tekimen) - https://tekitoh-memdhoi.info - https://github.com/youkidearitai -----------------------------