What is the alternative to drupal_realpath()? I use drupal_realpath() to do includes for some code samples I have:

 require_once(drupal_realpath('public://php_includes/functions.php'));


This gives the real path C:\www\sites\mysite\files\php_includes\functions.php.
What is the command to get the HTTP path http://mysite.com/sites/files/php_includes/functions.php?

The api documentation says "RealPath is deprecated"... if it's deprecated, what is supposed to replace it to get the same path (either C:\... or http://...)?
To get the HTTP path of a file, you need to use file_create_url($uri).

file_create_url('public://php_includes/functions.php');


This will output http://mysite.com/sites/files/php_includes/functions.php.

Regarding the fact that drupal_realpath() is deprecated, I think it's to warn developers to avoid relying on file system path and instead use wrappers.