Answers for "obejct php"

PHP
4

php define object

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

create an obect in php

<?php
class foo
{
    function do_foo()
    {
        echo "Doing foo."; 
    }
}

$bar = new foo;
$bar->do_foo();
?>
Posted by: Guest on May-28-2021

Browse Popular Code Answers by Language