Skip to main content
12 events
when toggle format what by license comment
S Nov 23, 2018 at 19:09 history suggested TZubiri CC BY-SA 4.0
Title is now a question.
Nov 22, 2018 at 8:45 comment added TZubiri These are two questions, would you care to separate them into two please? The first one is, should my class store the data from the database as a (presumably raw) single $_data variable or as separate properties? he second one is, should my function return an object or an array? These merit two different answers, since the second one has already been answered, I recommend extracting the first one into its own question. I'll post my answer as soon as you do this. Thanks, and good job on the interesting questions!
Nov 22, 2018 at 8:14 review Suggested edits
S Nov 23, 2018 at 19:09
Nov 22, 2018 at 8:09 comment added TZubiri Slight peeve, when you say class creation, you mean object creation. Class creation would be the act of writing the class code.
Aug 9, 2014 at 15:25 answer added user3791372 timeline score: 1
Aug 8, 2014 at 22:58 answer added Darien timeline score: 2
Jan 10, 2014 at 12:49 answer added Jérôme timeline score: 0
Nov 21, 2013 at 10:00 comment added Paul Voss I agree and recommend to have a look at ORMs like Doctrine or Propel. And try to avoid arrays whenever possible since they are kind of anti-OOP (e.g. no type hinting)... see the php manual for alternatives like Traversable, Iterator and ArrayAccess.
Nov 21, 2013 at 7:11 history edited Bart van Ingen Schenau CC BY-SA 3.0
made code example more readable
Nov 21, 2013 at 6:24 history edited gnat CC BY-SA 3.0
code formatting
Nov 21, 2013 at 6:22 comment added Ozair Kafray In short. 2 is better.
Nov 21, 2013 at 6:19 history asked Bakanyaka CC BY-SA 3.0