Run Rector on your code to see what it can do for you:

 {
     public function run(string $param)
     {
-        return preg_match('/^[0-9]+$/', $param);
+        return preg_match('/^d+$/', $param);
     }
 }
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: 16136f - released at 2026-03-16 17:05