Improve check php

| Q             | A |
| ------------- | --- |
| Bug fix?      | no |
| New feature?  | no |
| BC breaks?    | no |
| Deprecations? | no |
| Tests pass?   | n/a |
| Fixed tickets | https://github.com/symfony/symfony/issues/10881 |
| License       | MIT |
| Doc PR        | - |