最近需要使用PHP,所以我也只能把书拿出来看看,书是图灵的《PHP实战》,人民邮电出版的。

PHP中如何使用类

1: <?php
class Document{
protected $title;
private $text;
function __construct($title, $text) {
   6:             $this->title = $title;
   7:             $this->text = $text;
   8:         }
   9:     }
extends Document{
public $introduction;
function __construct($title, $text, $introduction) {
parent::__construct($title, $text);
  14:             $this->introduction = $introduction;
  15:         }
  16:     }
  17: ?>

相关文章:

  • 2021-12-28
  • 2021-11-30
  • 2021-12-01
  • 2021-11-16
  • 2021-08-12
  • 2021-04-16
  • 2021-04-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-06
  • 2021-12-09
  • 2022-03-03
相关资源
相似解决方案