History log of /php-src/ext/pcre/php_pcre.c (Results 126 – 150 of 648)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 2b9acd37 18-Mar-2019 Nikita Popov

Fixed bug #72685

We currently have a large performance problem when implementing lexers
working on UTF-8 strings in PHP. This kind of code tends to perform a
large number of matches

Fixed bug #72685

We currently have a large performance problem when implementing lexers
working on UTF-8 strings in PHP. This kind of code tends to perform a
large number of matches at different offsets on a single string. This
is generally fast. However, if /u mode is used, the full string will
be UTF-8 validated on each match. This results in quadratic runtime.

This patch fixes the issue by adding a IS_STR_VALID_UTF8 flag, which
is set when we have determined that the string is valid UTF8 and
further validation is skipped.

A limitation of this approach is that we can't set the flag for interned
strings. I think this is not a problem for this use-case which will
generally work on dynamic data. If we want to use this flag for other
purposes as well (mbstring?) then it might be worthwhile to UTF-8 validate
strings during interning. But right now this doesn't seem useful.

show more ...

# 275fa535 18-Mar-2019 Nikita Popov

Accept zend_string* instead of char* in php_pcre_match_impl()

Revision tags: php-7.3.3RC1, php-7.2.16RC1, php-7.2.15, php-7.3.2, php-7.2.15RC1
# 92ac598a 22-Jan-2019 Peter Kokot

Remove local variables

This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly

Remove local variables

This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files. All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.

show more ...

# 0cf7de1c 30-Jan-2019 Zeev Suraski

Remove yearly range from copyright notice

Revision tags: php-7.3.2RC1, php-5.6.40, php-7.1.26, php-7.3.1, php-7.2.14
# e219ec14 07-Jan-2019 Nikita Popov

Implement typed properties

RFC: https://wiki.php.net/rfc/typed_properties_v2

This is a squash of PR #3734, which is a squash of PR #3313.

Co-authored-by: Bob Weinand <bobwe

Implement typed properties

RFC: https://wiki.php.net/rfc/typed_properties_v2

This is a squash of PR #3734, which is a squash of PR #3313.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>

show more ...

# 2fab3302 02-Jan-2019 Nikita Popov

Use ZEND_PARSE_PARAMETERS_NONE in pcre

Instead of the manual ZEND_PARSE_PARAMETERS_START(0, 0) form.

# 27e9c05e 26-Dec-2018 Nikita Popov

Remove preg_options param from pcre_get_compiled_regex()

This parameter is always zero and not necessary to call pcre2_match.

I'm leaving the parameter behind on the _ex() variant,

Remove preg_options param from pcre_get_compiled_regex()

This parameter is always zero and not necessary to call pcre2_match.

I'm leaving the parameter behind on the _ex() variant, so the preg_flags
are still accessible in some way.

show more ...

# b1deb98c 26-Dec-2018 Nikita Popov

Fixed bug #77338

Set preg_options to 0 in php_pcre_get_compiled_regex(_ex). These
options are intended to be passed to pcre2_match. However, we do
not have any flags that actually ne

Fixed bug #77338

Set preg_options to 0 in php_pcre_get_compiled_regex(_ex). These
options are intended to be passed to pcre2_match. However, we do
not have any flags that actually need to be set during matching
(all relevant flags are set during compilation), and the preg_flags
value is used for PHP-specific flags instead.

This parameter should be removed entirely in master to avoid confusion.

show more ...

Revision tags: php-7.2.14RC1, php-7.3.1RC1, php-5.6.39, php-7.1.25, php-7.2.13, php-7.0.33, php-7.3.0
# ef1269d5 01-Dec-2018 Anatol Belski

Fixed bug #77193 Infinite loop in preg_replace_callback

Don't return preallocated match data more than once in nested calls.

Revision tags: php-7.1.25RC1, php-7.2.13RC1, php-7.3.0RC6, php-7.1.24, php-7.2.12, php-7.3.0RC5, php-7.1.24RC1, php-7.2.12RC1, php-7.3.0RC4, php-7.1.23, php-7.2.11, php-7.3.0RC3, php-7.1.23RC1, php-7.2.11RC1, php-7.3.0RC2, php-5.6.38, php-7.1.22, php-7.3.0RC1, php-7.2.10, php-7.0.32
# 68c34ce0 09-Sep-2018 Anatol Belski

Make a copy unconditionally

# 9278be14 09-Sep-2018 Anatol Belski

Fix memory leak in pcre cache

# c6ddd456 08-Sep-2018 Anatol Belski

Fixed bug #76850 Exit code mangled by set locale/preg_match

Revision tags: php-7.1.22RC1, php-7.3.0beta3, php-7.2.10RC1, php-7.1.21, php-7.2.9, php-7.3.0beta2, php-7.1.21RC1, php-7.3.0beta1, php-7.2.9RC1, php-5.6.37, php-7.1.20, php-7.3.0alpha4, php-7.0.31, php-7.2.8, php-7.1.20RC1, php-7.2.8RC1, php-7.3.0alpha3
# 8d3f8ca1 03-Jul-2018 Peter Kokot

Remove unused Git attributes ident

The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
use

Remove unused Git attributes ident

The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.

show more ...

# 5be44312 19-Jul-2018 Dmitry Stogov

Removed redundand code

# 54ebebd6 19-Jul-2018 Dmitry Stogov

Matching loops optimization

# b81d7129 19-Jul-2018 Dmitry Stogov

Micro optimizations

# 1820f2f2 18-Jul-2018 Dmitry Stogov

Reorder conditions

# 29f942b3 18-Jul-2018 Dmitry Stogov

Move "/e" modifier check into regex compiler

# 5d606511 18-Jul-2018 Dmitry Stogov

Merge "no_utf_check" and "g_notempty" into single "options".

# 81eb8e75 11-Jul-2018 Anatol Belski

Mark conditions unexpected

# 0630e3bc 05-Jul-2018 Anatol Belski

Reduce error buffer size

120 bytes is ample, the doc says.

# ff8f2710 29-Jun-2018 Anatol Belski

Check return value of pcre2_maketables()

# aa92d420 22-Jun-2018 Anatol Belski

If there's no setlocale, char tables are not used

# 8b58b2aa 22-Jun-2018 Anatol Belski

Don't discard char tables just generated

# 684ce24e 22-Jun-2018 Anatol Belski

Improve locale character tables handling and reduce pattern cache size

If a locale other than C is active, character tables are saved into the
compile context. Every compiled pattern wil

Improve locale character tables handling and reduce pattern cache size

If a locale other than C is active, character tables are saved into the
compile context. Every compiled pattern will have a pointer to the
character table, that was present in the context at the time of the
pattern compilation. Thus, the cache entries don't need to carry char
tables pointer, which reduces their size to 8 bytes on 64-bit. Instead,
the generated character tables are tracked in a separate HashTable. If a
character table was generated before, it'll be assigned to the compile
context when the locale changes. Otherwise a new char table will be
generated and cached.

show more ...

12345678910>>...26