国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

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 ("數(shù)學成績:$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

What are some very useful class libraries or tool libraries for PHP? What are some very useful class libraries or tool libraries for PHP?

06 Jul 2016

What are some very useful class libraries or tool libraries for PHP?

How Do I Link Static Libraries That Depend on Other Static Libraries? How Do I Link Static Libraries That Depend on Other Static Libraries?

13 Dec 2024

Linking Static Libraries to Other Static Libraries: A Comprehensive ApproachStatic libraries provide a convenient mechanism to package reusable...

Can I Include Code Directly Inside a PHP Class Definition? Can I Include Code Directly Inside a PHP Class Definition?

19 Nov 2024

Can I Include Code into a PHP Class?The Answer:No, you cannot directly include code within the body of a class in PHP. Inclusions must be...

laravel - What should the standardized PHP class library naming look like? laravel - What should the standardized PHP class library naming look like?

06 Jul 2016

I have seen many open source projects in the form of class.classname.php, but I have also seen many frameworks in the form of classname.class.php. Where should I place this class? I personally prefer the .class.php form, because in some frameworks, after importing third-party class libraries and specifying class libraries...

Why Do PHP Developers Use Leading Underscores in Class Methods? Why Do PHP Developers Use Leading Underscores in Class Methods?

11 Nov 2024

Hidden Truths: The Leading Underscore in PHP Class MethodsWhen browsing PHP libraries, one might stumble upon class methods prefixed with a...

Can I Include External Files Directly Inside a PHP Class Definition? Can I Include External Files Directly Inside a PHP Class Definition?

26 Nov 2024

Can I Include Code into a PHP Class?Question: Is it possible to include an external file containing method definitions into a PHP class?Answer:...

See all articles