Home PHP Libraries Other libraries php definition class
php definition class
<?php
class Student
{
  var $str_Name;
  var $str_Sex;
  var $int_Id;
  var $int_English;
  var $int_maths;
  function  Input ( $Name, $Sex, $Id, $English, $Maths)
  {
    $this->str_Name=$Name;
    $this->str_Sex =$Sex;
    $this->int_Id =$Id;
    $this->int_English=$English;
    $this->int_Maths=$Maths;
  }
  function ShowInfo()
  {
      echo ("姓名:$this->str_Name<br>
  ");
  echo ("性别:$this->str_Sex <br>
  ");
  echo ("学号:$this->int_Id <br>
  ");
  echo ("英语成绩:$this->int_English <br>
  ");
  echo ("数学成绩:$this->int_Maths <br>
  ");
  }
}
  $Wing = new Student;
  $Wing->Input ("Wing","男",33,95,87);
  $Paladin = new Student;  
  $Paladin->Input ("paladin","女",38,58,59.5);  
  $Wing->ShowInfo();
  $Paladin->ShowInfo();
?>

Defines the human class, including name, gender, student number, English score, math score, etc.

Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

Definition and usage of pdo public class in php Definition and usage of pdo public class in php

19 May 2018

This article mainly introduces the definition and usage of the PDO public class implemented by PHP, and analyzes the PDO operation class definition and query, insertion and other usage techniques implemented by PHP based on specific examples. Friends who need it can refer to it.

php pdo public class definition and usage example sharing php pdo public class definition and usage example sharing

06 Feb 2018

This article mainly introduces the definition and usage of the PDO public class implemented by PHP, and analyzes the PDO operation class definition and query, insertion and other usage techniques implemented by PHP in the form of specific examples. Friends in need can refer to it. I hope it can help everyone.

24 useful PHP class libraries to share, 24php class libraries_PHP tutorial 24 useful PHP class libraries to share, 24php class libraries_PHP tutorial

13 Jul 2016

24 useful PHP libraries to share, 24php libraries. 24 useful PHP libraries to share, 24php libraries Currently, PHP is the most popular scripting language used for web development. You can easily find a lot of information about PHP on the Internet, including documentation, tutorials,

15 Very Practical Open Source PHP Class Libraries, 15 Open Source Class Libraries_PHP Tutorial 15 Very Practical Open Source PHP Class Libraries, 15 Open Source Class Libraries_PHP Tutorial

13 Jul 2016

15 very practical open source PHP libraries, 15 open source libraries. 15 very practical open source PHP class libraries, 15 open source class libraries The PHP library provides developers with a standard interface, which helps developers make full use of object-oriented programming in PHP. These libraries are specific

20 Very Useful PHP Class Libraries_PHP Tutorial 20 Very Useful PHP Class Libraries_PHP Tutorial

15 Jul 2016

20 extremely useful PHP libraries. Below are some very useful PHP libraries, which I believe can provide a better and faster method for your WEB development. Chart libraries The following libraries allow you to easily create complex charts.

hover pseudo-class selection definition and usage hover pseudo-class selection definition and usage

29 Oct 2016

Sets the style of an element on mouseover. E elements can be selected through other selectors, such as class selectors, id selectors, type selectors, etc. Special note: IE6 does not support this selector, but it can support :hover of the a element, that is, it only supports :hover of the a element selected through the type selector.

See all articles