Improve check php

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