You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
348 B
23 lines
348 B
<?php
|
|
/**
|
|
* 把命名空间比喻成文件目录
|
|
*/
|
|
namespace kuangweijian;
|
|
|
|
$varA=1;
|
|
|
|
function funcA(){
|
|
echo "hello world".PHP_EOL;
|
|
}
|
|
|
|
class ClassA
|
|
{
|
|
public $varA;
|
|
public function funcA(){
|
|
echo "hello".PHP_EOL;
|
|
}
|
|
}
|
|
|
|
$obj=new ClassA;
|
|
$obj->funcA();
|
|
?>
|