⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 07c00-1.php

📁 介绍PHP5的给类型函数应用
💻 PHP
字号:
<?php// Define a simple class that simply echoes the value given it.class SimpleClass {    public $data;    public function echoMyData() {        echo $this->data;    }}// Create an object based on SimpleClass$sc_object = new SimpleClass();// Set a value for the data of the object$sc_object->data = "Hello, world! ";// Now let us create another object and give it a different value.$another_object = new SimpleClass();$another_object->data = "Goodbye, world! ";// Use the class method to print out the value of our two objects.$sc_object->echoMyData();$another_object->echoMyData();// The output from this script will be://    Hello, world! Goodbye, world!?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -