VS.Php adds support for __autoload

We have added support for __autoload to VS.Php. Here is how it works.

When you have in your code something like this:

$a = new foo();

VS.Php will try to include foo.php. This is the default behavior. It is equivalent to this:

require_once("foo.php");
$a = new foo();

You can change the behavior of this feature by adding a registry key. We will put this in the UI at some point in the future.

Under the HKEY_LOCAL_MACHINE\Software\VS.Php\V2.3\2005 (Change your edition if different)

Add the following string entry autoloadTemplate
http://www.jcxsoftware.com/jcx/node/add/blog
Submit blog entry | Jcx.Software Corp.
The value should look something like this:

%s.php
classs.%s.php

Where %s will be the name of the class.

If you leave the value empty, the feature will be disabled.

Give it a try and let me know. The feature will be available in today's build at:

http://www.jcxsoftware.com/jcx/vsphp/beta