Home  >  Article  >  Backend Development  >  How to use PHP to continuously call functions using chain calls

How to use PHP to continuously call functions using chain calls

墨辰丷
墨辰丷Original
2018-06-07 17:55:062889browse

This article mainly introduces how to use PHP to continuously call functions using chain calls. Friends who are interested can refer to it. I hope it will be helpful to everyone.

The details are as follows:

";
    return $this;
  }
  function age($agec) {
    echo "我的年龄是:$agec 
"; return $this; } } $xind = new xin(); $xind->name("星星")->age("10000"); ?>

The running results are as follows:

My name is: Xingxing
My age is: 10000

Summary: The above is the entire content of this article, I hope it will be helpful to everyone's study.

Related recommendations:

Detailed explanation of fuzzy query and association of three select boxes with pictures and text in PHP

PHP How to use Socket to obtain the SSL certificate and public key of the website

Detailed explanation of fuzzy query and association of three select boxes in PHP with pictures and text

The above is the detailed content of How to use PHP to continuously call functions using chain calls. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn