Skip to content
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

PHP 8.x warnings #15

Open
qcybb opened this issue Nov 11, 2021 · 1 comment
Open

PHP 8.x warnings #15

qcybb opened this issue Nov 11, 2021 · 1 comment

Comments

@qcybb
Copy link

qcybb commented Nov 11, 2021

PHP Deprecated: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in /www/example.com/httpdocs/opcache.php

To fix this :

Find :
uasort($status['scripts'], function ($a, $b) { return $a['hits'] < $b ['hits']; });

Replace :
uasort($status['scripts'], function ($a, $b) { return $b['hits'] <=> $a ['hits']; });

I hope this helps someone.

@qcybb
Copy link
Author

qcybb commented Nov 13, 2021

My fork that is fully PHP 8.x compatible :

https://github.com/qcybb/opcache-dashboard-php8

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

No branches or pull requests

1 participant