This code does not produce any error:
<?php
class A {
/**
* @deprecated
*/
protected static string $staticVar = 'staticVarInA';
/**
* @deprecated
*/
protected string $var = 'varInA';
}
class B extends A {
protected static string $staticVar = 'staticVarInB';
protected string $var = 'varInB';
}