<?php class Test{ public static $static_var = 20; } echo Test::$static_var;exit; 转载于:https://www.cnblogs.com/lizhaoyao/p/4828373.html