Procedures like PROC GLIMMIX have a DDFM=method option on the MODEL statement to:
"specify the method for computing the denominator degrees of freedom for the tests of fixed effects that result from the MODEL, CONTRAST, ESTIMATE, LSMEANS and LSMESTIMATE statements."
Specifics on these methods can be found in the Details => Degrees of Freedom Methods - - http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_glimmix_deta... of the GLIMMIX procedure documentation.
PHREG does not have this feature and, indeed, does not handle a multi-level clustered situation beyond two levels, e.g. - county nested in state.
A received request is paraphrased as follows "I am doing some tests for fixed effects of level 2 (cluster level) using data of two levels with varying sample size in different clusters. If you look for a reference and see how other software has done, refer to STATA 14 and the MESTREG command - https://www.timberlake.co.uk/software/stata-new-multilevel-and-small-sample "