Ejemplo n.º 1
0
        $this->name = 'This is a string';
        echo $this->name . '<br>';
    }
    /**
     * Addition Function
     * show below how to call
     * and use them
     * @param $a
     * @param $b
     */
    function add_function($a, $b)
    {
        $c = $a + $b;
        echo $c;
    }
}
?>

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <?php 
$add = new Addition();
$add->add_function(2, 3);
?>
</body>
</html>