2015年3月12日星期四

PHP 静态变量的使用"::"

静态变量或者静态方法 都使用 '::'来调用访问

<?php
$ab=new a1();$ab->s1;
echo a1::$st1;
class a1{    var $s1;    public static $st1="static ";}?>

1 条评论: