国产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

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...

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...

Why Do Some PHP Class Methods Start with an Underscore? Why Do Some PHP Class Methods Start with an Underscore?

09 Nov 2024

Why Do Some PHP Class Methods Begin with an Underscore?While exploring PHP libraries, you might have noticed that certain developers prefer to...

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:...

How Can I Include External Methods into My PHP Class Definition? How Can I Include External Methods into My PHP Class Definition?

19 Nov 2024

Including Code in PHP Classes: Exploring Feasibility and AlternativesProblem:You seek to include methods from a separate file into your PHP class...

See all articles