Examveda
Examveda

In the PHP code given below, what is/are the properties?
<?php
    class Example 
    {
        public $name;
        function Sample()
        {
            echo "This is an example";
        }
    } 
?>

A. echo “This is an example”;

B. public $name;

C. class Example

D. function sample()

Answer: Option B

Solution(By Examveda Team)

Yes they are nothing but variables.

This Question Belongs to PHP >> Object Oriented Concept

Join The Discussion

Related Questions on Object Oriented Concept