面向对象基础
2017-02-12 17:39
155 查看
<?php /** * Created by PhpStorm. * User: Vvvvv * Date: 2017/2/11 * Time: 8:36 */ //$arr = array('x','y','z'); //$x = anshu($a,$b); //list($a,$b,$c) = $arr; //$arr[0]; //echo $a; //echo key($arr); //echo current($arr); //next($arr); //echo key($arr); //echo current($arr); class test_class { public $abc;//private私有变量 protect受保护的变量 public $a; public $b; function square() { return $this->a * $this->b; } } $shili = new test_class(); $shili2 = new test_class(); $shili->a = 4; $shili->b = 5; $return = $shili->square(); //document.write() //document->write() var_dump($shili); echo "<br>"; var_dump($shili2);
相关文章推荐
- 面向对象的设计与实现的一些基础但重要的概念
- 可复用面向对象软件的基础--图例
- 《面向对象基础:C++实现》学习笔记之七
- 面向对象基础知识(二)-类的继承
- Design Patterns(设计模式 可复用面向对象软件的基础)
- 借书20041102_《设计模式:可复用的面向对象软件的基础》《微软项目:求生法则》
- [原创][PowerShell教程][04]PowerShell面向对象基础之一
- 设计模式 可复用面向对象软件的基础(概念你认识多少)
- 第一章 面向对象基础
- 什么事都得先打好基础,学习面向对象也是如此
- Java面向对象基础要点
- C#面向对象设计模式 学习之旅(一) - 面向对象编程基础
- 《面向对象基础:C++实现》学习笔记之六
- 《面向对象基础:C++实现》学习笔记之四
- 面向对象的 Javascript 面向对象基础
- 可复用面向对象软件的基础(1)--图例
- 《面向对象基础:C++实现》学习笔记之三
- 《面向对象基础:C++实现》学习笔记之五
- 面向对象语言基础 一
- 面向对象设计指南 基础篇