クラス6




PHPのテストです。

現在のチャンネルは 8

--- ソースコード ---
	<?php

	$tv = new Television();

	print('現在のチャンネルは	'.$tv->getChannel().'<br>' );

	class Television {
		private $channelNo;

		public function __construct() {
			$this->channelNo = 8;
		}

		public function getChannel() {
			return $this->channelNo;
		}
	}

	?>



最終更新日 2023/3/5