Classic case: Object-oriented Graphing calculator

Source: Internet
Author: User
Classic example: Object-oriented Graphing calculator
In the index.php file, there are
echo New Form ("index.php"); A form is a class that has a construction method inside it.

echo New Result ();
What does this mean, new is not creating an object? So the output object can also ah. What's the name of the object you created?
Report:
The form class is constructed in the following way:
function __construct () {
$this->action= $action;
$this->shape=isset ($_get["action"])? $_get["Action"]: "rect";
}

------Solution--------------------
echo New Form ("index.php"); An instantiated object of the output form, which is an object. Use the Echo output will be error, to use Print_r (); Printing is only a line.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.