  We provide an analytic proof of a theorem of Krylov dealing with global $C^{1,1}$ estimates to solutons of degenerate complex Monge-Amp\`ere equations. As an application we show optimal regularity for various extremal functions with nonconstant boundary values. 
An analytic proof of the Krylov estimates for the complex Monge-Ampere   equation and applications