Some doubts about php code?

\\circle.class.php
 1 <?php
 2     class Circle extends Shape{
 3         private $radius = 0;
 4         function __construct(){
 5             $this->shapeName = "";
 6             if($this->validate($_POST["radius"],"")){
 7                 $this->radius = $_POST["radius"];
 8             }
 9         }
10         
11         function area(){
12             return pi()*$this->radius*$this->radius;
13         }
14         
15         function perimeter(){
16             return 2*pi()*$this->radius;
17         }
18     }
19 ?>
What does the code on line 20 mean? Why the parameter index.php is passed in.
and where did the $_ GET in line 7 of form.class.php come from? I looked at the whole code and didn"t see where it stated that the data was passed in get.

Php
Mar.03,2021

index.php is introduced because the form to be submitted
$_ GET is included with php. Get get parameters


_ autoload learn about
hyperglobal variables learn
manual learn


index.php should be a html page with only .php suffix, pass in the parameter index.php, then echo will output html content, and echo an object will automatically call the _ _ toString method.

The

$_ GET variable is a global variable built into php, which stores the get parameter in request

Menu