对于IDE,有很多选项。有VS.PHP(集成在VS中),eclipse PDT,Zend Studio(基于eclipse构建,但不是免费的)
在PHP中无法使用访问器声明类,因此声明了一个类:
class {}
//and not
public class {}
Run Code Online (Sandbox Code Playgroud)
如果文件中有一个类,并且想在另一个文件中使用它,则需要包含该文件
require_once('MyClass.php');
$myClass = new MyClass(); //note that PHP is not type safe so a variable does not have a type
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
249 次 |
| 最近记录: |