标签:价值 work cti UNC 常量 北京 self soho php
<?php class mycoach { public $name="陈培昌"; CONST hisage =22; public static $earnfor =2789; public static $address = "北京市朝阳区三里屯soho北武堂"; private $favorite = "喜欢丁大锅"; public function __construct() { echo "{$this->name}到目前为止,为馆里卖出的装备价值".mycoach::$earnfor."元".PHP_EOL; } public static function workingaddr() { echo self::$address.PHP_EOL; } } $cpc = new mycoach(); $cpc->workingaddr(); ?>
运行结果:
陈培昌到目前为止,为馆里卖出的装备价值2789元
北京市朝阳区三里屯soho北武堂
标签:价值 work cti UNC 常量 北京 self soho php
原文地址:https://www.cnblogs.com/saintdingspage/p/10988474.html