PHP变量范围

Moo*_*oon 2 php variables scope

文件名myServices.php

<?php
   $gender = 'MALE';
?>
Run Code Online (Sandbox Code Playgroud)

在另一个文件中让我们说file.php

    include "myServices.php"

    $name = 'SAM';
    $age  = '23';
?>

<!--after some more HTML code-->
<?php

    $gender = 'FEMALE';        
    $name = 'ELENA';
    //Question:
    //In the above statements are there new variables created or the 
    //previous variables are reassigned new values

?>
Run Code Online (Sandbox Code Playgroud)

Cod*_*ula 11

先前的变量是重新分配的新值.