Re: [PHP-DEV] Suggestion: Make all PCRE functions return *character* offsets, rather than *byte* offsets if the modifier `u` (PCRE_UTF8) is given

2020-10-02 Thread Claude Pache
Hi, Working with UTF-8-encoded strings does not implies working with mb_string functions or with code-point counts. Personnally, I work with standard string functions, plus [Grapheme functions] (https://www.php.net/manual/en/ref.intl.grapheme.php

Re: [PHP-DEV] RFC: execution opcode file without php source code file

2020-10-02 Thread Walter Parker
On Fri, Oct 2, 2020 at 10:08 AM David Rodrigues wrote: > > Hello folks, > > Instead of an opcode without a php source file, that I imagine is to > protect the code itself, why not a method to encrypt phar files (not like a > password). I do not know if exists a secure method to decrypt to execute

Re: [PHP-DEV] RFC: execution opcode file without php source code file

2020-10-02 Thread David Rodrigues
Hello folks, Instead of an opcode without a php source file, that I imagine is to protect the code itself, why not a method to encrypt phar files (not like a password). I do not know if exists a secure method to decrypt to execute only, without reveals the original source code, but maybe it could

Re: [PHP-DEV] RFC: execution opcode file without php source code file

2020-10-02 Thread Rowan Tommins
On Thu, 1 Oct 2020 at 16:13, Dik Takken wrote: > The only use case I see is to package commercial closed source > applications as Docker containers. That allows the packager to ship the > compiled code along with the exact PHP version and configuration that > can run it reliably. > Could this n

Re: [PHP-DEV] RFC: execution opcode file without php source code file

2020-10-02 Thread Rowan Tommins
On Fri, 2 Oct 2020 at 10:43, €– ”k”k wrote: > For example, Java,.NET, etc., I mean that opcode compiled files can be > bound to fixed versions without considering the compatibility of different > versions. > As I said already, this comparison is simply incorrect: both .net and Java have been ca

Re: [PHP-DEV] Re: Suggestion: Make all PCRE functions return *character* offsets,rather than *byte* offsets if the modifier `u` (PCRE_UTF8) is given

2020-10-02 Thread Colin O'Dell
The ability to receive the "character" offset would be extremely useful to the league/commonmark project. This project is a Markdown parser which conforms to the CommonMark spec which defines all behavior with regards to Unicode code points: On Fri, O

[PHP-DEV] Re: Suggestion: Make all PCRE functions return *character* offsets,rather than *byte* offsets if the modifier `u` (PCRE_UTF8) is given

2020-10-02 Thread Christoph M. Becker
On 10/2/2020 at 12:01 PM, Thomas Landauer wrote: > this is a follow-up of a bug I opened, and cmb suggested to continue > here: https://bugs.php.net/bug.php?id=80166 Indeed, thanks! > Advantages: > > 1: Easier string manipulation: > If somebody does (as in my case) `preg_match_all()` with > PREG

[PHP-DEV] Suggestion: Make all PCRE functions return *character* offsets, rather than *byte* offsets if the modifier `u` (PCRE_UTF8) is given

2020-10-02 Thread Thomas Landauer
Hi, this is a follow-up of a bug I opened, and cmb suggested to continue here: https://bugs.php.net/bug.php?id=80166 Advantages: 1: Easier string manipulation: If somebody does (as in my case) `preg_match_all()` with PREG_OFFSET_CAPTURE, what will they probably use those returned numbers/offsets

Re: [PHP-DEV] RFC: execution opcode file without php source code file

2020-10-02 Thread Pierre
Le 01/10/2020 à 18:32, Levi Morrison via internals a écrit : > Note that for PHP 8.0 we made the system ID change even more than it > used to because doing so fixes sigsegvs when switching what extensions > are loaded (common when trialing an APM product, or loading and > unloading xdebug) when fil

[PHP-DEV] 回复: [PHP-DEV] RFC: execution opcode file without php source code file

2020-10-02 Thread €– ”k”k
For example, Java,.NET, etc., I mean that opcode compiled files can be bound to fixed versions without considering the compatibility of different versions. The current opcode file load in Opcache is as follows: [request]>[find OP cache]->[load OP]>[verify OP]>[exec OP] Patch chang