Skip to content

PHP 8 support #4306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 52 commits into from
Aug 6, 2020
Merged

PHP 8 support #4306

merged 52 commits into from
Aug 6, 2020

Conversation

samdark
Copy link
Member

@samdark samdark commented Aug 5, 2020

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Tests pass? ✔️
Fixed issues -

@samdark samdark added this to the 1.1.23 milestone Aug 5, 2020
@samdark samdark merged commit 8423571 into master Aug 6, 2020
@samdark samdark deleted the php8 branch August 6, 2020 22:02
tillkruss added a commit to predis/predis that referenced this pull request Aug 11, 2020
tillkruss added a commit to predis/predis that referenced this pull request Aug 11, 2020
Comment on lines +132 to +136
if(version_compare(PHP_VERSION,'8.0','>=')) {
$isArray=$param->getType() && $param->getType()->getName()==='array';
} else {
$isArray = $param->isArray();
}
Copy link
Member

Choose a reason for hiding this comment

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

Code formatting could be improved a little bit.

Comment on lines +99 to +101
} else {
$isArray=$param->isArray();
}
Copy link
Member

Choose a reason for hiding this comment

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

Code formatting could be improved a little bit.

@diego-mathis
Copy link

diego-mathis commented Oct 2, 2020

fyi use \version_compare instead of version_compare
The later looks up the function in current namespace, and only after finds the correct one.
image

see page 63-65 https://www.slideshare.net/nikita_ppv/php-performance-trivia

edit: seems fine for 5.3+ https://3v4l.org/6adjF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants