View Single Post
  #2 (permalink)  
Old 2006-11-04, 07:37 AM
Jcx.Software Jcx.Software is offline
Junior Member
 
Join Date: Jan 2004
Location: USA
Posts: 25
Jcx.Software
Default Check VS.Php

Think about this scenario:

class Test2 {
public $whatever;
}

class Test3 {
public $whatever2;
}

class Test1 {
public $instanceOfTest2;

function Test1($useTest2) {
if ($useTest2 == true)
$this->$instanceOfTest2 = new Test2;
else
$this->$instanceOfTest2 = new Test3;
}
}

it would be hard to determine the proper type. Instead of guessing around, what we recommend is that you use PhpDoc comments and explicitely state the $instanceOfTest2's type. That way VS.Php does not have to guess around and will always do what you tell it you want it to do. Besides, using PhpDoc comments is a good coding practice.

BTW, all the other features you listed are supported in VS.Php.

Check VS.Php Standalone Edition: http://www.jcxsoftware.com/vs.php
Reply With Quote