Answers for "php object functions"

PHP
4

php define object

$x = new stdClass();
Posted by: Guest on February-19-2020
2

php object example

<?php
class Bike
{
    function model()
    {
        $model_name = 'cd100';
        echo "bike model:$model_name";
    }
}
$obj = new Bike();
$obj->model();
?>
Posted by: Guest on September-03-2021

Browse Popular Code Answers by Language