Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@stof
Copy link
Member

@stof stof commented Mar 30, 2015

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #14086
License MIT
Doc PR n/a

PHP 7 does not handle the hexadecimal notation in is_numeric checks anymore, so the detection needs to be implemented explicitly.

With this change, we should have a passing testsuite on PHP 7

PHP 7 does not handle the hexadecimal notation in is_numeric checks
anymore, so the detection needs to be implemented explicitly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity: what is the meaning of the double ++ ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a possessive quantifier to forbid backtracking (because backtracking cannot allow to find another way to match for this regex anyway). this allows to match much longer strings since we won't reach the backtracking limit.
See http://php.net/manual/en/regexp.reference.repetition.php for the doc about it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's clever. Thanks.

@fabpot
Copy link
Member

fabpot commented Mar 30, 2015

Thank you @stof.

@fabpot fabpot merged commit e848040 into symfony:2.3 Mar 30, 2015
fabpot added a commit that referenced this pull request Mar 30, 2015
This PR was merged into the 2.3 branch.

Discussion
----------

Add parsing of hexadecimal strings for PHP 7

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14086
| License       | MIT
| Doc PR        | n/a

PHP 7 does not handle the hexadecimal notation in is_numeric checks anymore, so the detection needs to be implemented explicitly.

With this change, we should have a passing testsuite on PHP 7

Commits
-------

e848040 Add parsing of hexadecimal strings for PHP 7
@stof stof deleted the php_7 branch March 30, 2015 08:06
@stof
Copy link
Member Author

stof commented Mar 30, 2015

@fabpot should we remove the allow_failure for PHP 7 or not yet ?

@fabpot
Copy link
Member

fabpot commented Mar 30, 2015

@stof: Yes, let's do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants