MEM wrote:
>> By the way, there are many reasons for creating objects inside of other
>> objects. This should not be considered an exception. I don't know where
>> this code belongs to, so I can't clear out if it is good or bad OOP
>> style.
>
> I do not intend to public judge the author, but the
> By the way, there are many reasons for creating objects inside of other
> objects. This should not be considered an exception. I don't know where
> this code belongs to, so I can't clear out if it is good or bad OOP
> style.
I do not intend to public judge the author, but the original article is
erstag, 30. Juli 2009 12:21
An: php-general@lists.php.net
Betreff: [PHP] stdClass - A newbie question
Hello everybody,
In this class sketch:
total_pages = $total_pages;
$pagi_obj->offset = $offset;
$pagi_obj->limit = $limit;
$pagi_obj->page;
return $pagi_obj;
Hello everybody,
In this class sketch:
total_pages = $total_pages;
$pagi_obj->offset = $offset;
$pagi_obj->limit = $limit;
$pagi_obj->page;
return $pagi_obj;
}
}
Why do the author used a stdClass ?
What are the advantages of using
Cere Davis wrote:
> Hey folks,
>
> Does anyone know of a painless way to convert a stdClass object to an
> associative array in php?
Just cast it:
$arr = (array) $stdClassInstance;
> Also, I wonder, is there a way to "flatten" associative arrays in php?
> So say:
> $b=new array(s=>"S")
> $a=new
Hey folks,
Does anyone know of a painless way to convert a stdClass object to an
associative array in php?
Also, I wonder, is there a way to "flatten" associative arrays in php?
So say:
$b=new array(s=>"S")
$a=new array(a=>"A",b=>$b)
goes to:
$z=flatten($a);
z turns to:
(a=>"A", b=>$b, s=>
Please can some explain to me what the stdClass is used for in
PHP 5. I've tried to use the reflection API to reverse engineer it
but it does not give you much on the stdClass
What methods can be inherited from this class?
Does it work the same was as the java base class - Object?
7 matches
Mail list logo