SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 36

Hybrid View

  1. #1
    SitePoint Wizard silver trophy Bleys's Avatar
    Join Date
    Feb 2003
    Location
    RI-USA
    Posts
    5,620
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How does PHPonTrax compare to RoR?

    Not sure if this should go in the PHP forum or the Ruby forum, but since this one is new and needs more posts, I'll put it here.

    I'm curious to hear from people who have used both, how does PHPonTrax (which calls itself and RoR clone), compare to Ruby on Rails?

    Off Topic:

    Does anyone else find it funny, that 37Signals, the people who invented Ruby on Rails, use php-based PunBB for the Basecamp forums? :P http://www.basecamphq.com/forum/
    Josh is a ghost
    rails & work & twitter

    Organization is the
    death of creativity.

  2. #2
    SitePoint Member
    Join Date
    Sep 2004
    Location
    Jeddah, Saudi Arabia
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think PHPontrax is new. Let me try it.

    I don't think 37signals people have enough time to code a forum once again! Since there are already great forums available to use, they did! That's what I believe

  3. #3
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does anyone else find it funny, that 37Signals, the people who invented Ruby on Rails, use php-based PunBB for the Basecamp forums? :P http://www.basecamphq.com/forum/
    No, why reinvent the wheel? PunBB is a perfectly good piece of forum software. I'm sure they've got better things to do than waste their time on yet another piece of forum software.

    PHP Rails clones keep on coming out of the woodwork but they will never be as expressive and elegant as Rails, due to PHP's limitations (or more accurately, Ruby's advantages and ability to create great DSLs). By all means try them out but I'd always recommend Rails as the Ruby language and the expressiveness of Rails as a result of this is part of what makes using it so enjoyable.

    Parts of the official ROR website use PHP too.

  4. #4
    SitePoint Wizard silver trophy Bleys's Avatar
    Join Date
    Feb 2003
    Location
    RI-USA
    Posts
    5,620
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    Quote Originally Posted by Luke Redpath
    No, why reinvent the wheel? PunBB is a perfectly good piece of forum software. I'm sure they've got better things to do than waste their time on yet another piece of forum software.
    There was a reason I put that in an off topic box with a ":P" smiley
    Josh is a ghost
    rails & work & twitter

    Organization is the
    death of creativity.

  5. #5
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think PHPonTrax is as good as Rails because you'll still be coding in PHP, and that isn't as clean as Ruby.

  6. #6
    SitePoint Zealot
    Join Date
    Sep 2000
    Location
    England
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've just been having a look at PHPonTrax today and it looks promising as a Rails clone, but it's nowhere near finished yet.

    I was hoping it'd give me an easier intro to Rails before/while learning Ruby but there's only really the base functionality there so far.

  7. #7
    Resident Java Hater
    Join Date
    Jul 2004
    Location
    Gerodieville Central, UK
    Posts
    446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fenrir2
    I don't think PHPonTrax is as good as Rails because you'll still be coding in PHP, and that isn't as clean as Ruby.
    Ditto, I agree, the clones will never have everything Rails has because Ruby is a superior language. The only exception I could say would be Python (Only coz it's similar to ruby on the surface), which if I remember rightly has CherryPy. The PHP and Java ports will never be that good.

    Personally, I would stick to Cake if you have to use PHP. It's more mature. However, I can safely say that in my old job, when we were deciding to move to Rails / Ruby or Cake / PHP, we were happy we went with Ruby in the end. It's a lot more elegant as a language, and doesn't take long to learn

  8. #8
    SitePoint Member
    Join Date
    Jan 2005
    Location
    utah
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I made a point of this in some other topic today:
    PHP on Trax (http://phpontrax.com):
    1. TRUE TO RAILS: Follow Rails as closely as possible. Others (e.g. Cake) does not.
    a. benefit: Rails is great, why stray?
    b. benefit: Only need to really learn one framework (instead of many) for all those who do both ruby and php.
    2. FAMILIARITY: Ruby is not hard to learn, but this framework will allow smoother transition for those desiring to adopt Ruby in addition to PHP.
    3. LIBRARIES: Works with PEAR, It is farther along than they mention on their site (in other ways as well). Ruby does not have enough libraries yet, although we hope they will grow quickly.
    4. Supports PHP5, which is one step closer to true OO.
    5. MORE: I will try to get some updates from the Trax guys this weekend, as well as input from current users of Trax--since I know the head dev.

    (http://phpontrax.com)

  9. #9
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Yakima WA.
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hippypink
    I made a point of this in some other topic today:
    PHP on Trax (http://phpontrax.com):
    1. TRUE TO RAILS: Follow Rails as closely as possible. Others (e.g. Cake) does not.
    a. benefit: Rails is great, why stray?
    b. benefit: Only need to really learn one framework (instead of many) for all those who do both ruby and php.
    2. FAMILIARITY: Ruby is not hard to learn, but this framework will allow smoother transition for those desiring to adopt Ruby in addition to PHP.
    3. LIBRARIES: Works with PEAR, It is farther along than they mention on their site (in other ways as well). Ruby does not have enough libraries yet, although we hope they will grow quickly.
    4. Supports PHP5, which is one step closer to true OO.
    5. MORE: I will try to get some updates from the Trax guys this weekend, as well as input from current users of Trax--since I know the head dev.

    (http://phpontrax.com)

    What libraries does ruby not have that you need? I find that while its true that ruby may have less libs than php, the quality of these libs is vastly superior. The attitude in the ruby community is usually closer to having one or two high quality libs that do the same thing but do it well as compared to php where there are hundreds of libs but much of them are of dubious quality.
    Using ruby only instead of php for the last year coming from 5 years of php here. I haven't come across a situation yet where there was some lib I needed that was missing from ruby. And if anything was missing it is usually because it would be trivial to write yourself. You really ought to try ruby more and get to know whats available for it before saying it has missing libraries. Also trying to clone rails with php no matter how close you try to stay with the rails way of doing things, there are going to be rubyisms that just can't be handled anywhere near as elegantly with php. Ruby is really not that hard to learn if you know php well enough to use a framework like this, so your time might be better spent actually expanding your horizons and learning the real rails/ruby. I think you will be more than pleased that you did. I know I am ;-)

    Cheers-
    -Ezra

  10. #10
    SitePoint Guru 33degrees's Avatar
    Join Date
    May 2005
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ezmobius1
    Ruby is really not that hard to learn if you know php well enough to use a framework like this, so your time might be better spent actually expanding your horizons and learning the real rails/ruby.
    While this is undoubtedly true, there are still many occasions where one has no choice but to use PHP, so there definitely is a need for a php framework that's as easy to use as rails is. To that end, I fully encourage people to port rails to php as much as they want.

    As for PHP on Trax itself, it is more Rails-like than Cake is, but it isn't quite a rails clone. It's certainly lacking a lot of the functionality found in rails, but that may be just a question of time.

  11. #11
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Yakima WA.
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by 33degrees
    While this is undoubtedly true, there are still many occasions where one has no choice but to use PHP, so there definitely is a need for a php framework that's as easy to use as rails is. To that end, I fully encourage people to port rails to php as much as they want.
    You're right. If you are stuck with php as a platform then these rails clones could definitely be a good alternative. I'm not knocking php as a language or the rails clone frameworks if you are stuck in phpland. But if you have a greenfield project and have a choice of rails versus a rails clone in x language, then I would definitely go with rails. I might be biased thoug. I now make 100% of my income working with ruby/rails ;-)

  12. #12
    SitePoint Member
    Join Date
    Jan 2005
    Location
    utah
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    not quite a clone yet

    Quote Originally Posted by 33degrees
    While this is undoubtedly true, there are still many occasions where one has no choice but to use PHP, so there definitely is a need for a php framework that's as easy to use as rails is. To that end, I fully encourage people to port rails to php as much as they want.

    As for PHP on Trax itself, it is more Rails-like than Cake is, but it isn't quite a rails clone. It's certainly lacking a lot of the functionality found in rails, but that may be just a question of time.
    True, but its pretty much one serious developer, and a couple others that have added a few contributions, so it really needs some community support to really move forward.

  13. #13
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    Manchester
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    a. benefit: Rails is great, why stray?
    Rails, IMHO, isn't that good. Using rails I'm forced to use ActiveRecord. CRUD doesn't help me at all. I use SQLite/Firebird and transactions with multi-table queries/inserts. I use a PHP-specific Object Database. I also use XML databases and SOAP resources. CRUD can't use any of those.

    I'm also forced to intermix code and HTML. Erm, no. I stopped sucking my thumb when I was 4.

    Only need to really learn one framework (instead of many) for all those who do both ruby and php.
    OK. Sounds good. But what about improvement? I'm sure that there'll be some way of improving the model, database abstraction, etc. All that "learning one framework" will achive is stopping progression. Isn't invention born of necessity?

    What libraries does ruby not have that you need?
    I'm still looking for decent XML and XSLT libraries. All I want to do is translate an object to XML, and use XSL to translate that. PHP4? Easy. PHP5? Easier! Ruby? Erm... err... well... still waiting for all the RoR bods to point me in the right direction. And if the result is not as quick as PHP's XML extension then sorry, but I'll see you in a few years when I've got to convert someone's Ruby app into PHP7.

    Also, I'd like to see a very simple db abstraction layer. Not ActiveRecord, no ORM, nothing as over-blown as that. Something simple, like the Eclipse library that used to be available for PHP4 (and which I still use and have ported to PHP5 for my own use). That baby was refactored to such a level that the developer just gave up because he couldn't go any further!

    I'm not ruby bashing here.

    Ruby is a lovely language to use, and I'm really enjoying playing with it. But Rails, IMHO, isn't all its played up to be. And all the RoR bods playing it up aren't really looking at what they're using from an objective (no pun intended) point of view. They're just feeding off they hype.

    If you're looking for a simple, easy to use, and fully extensible framework for PHP look to Mojavi. You're not forced to use a specific db abstraction layer, model, or even render (you can add your own). I've studied lots of PHP frameworks over the past few years, and most are ports of Java/Ruby/Python frameworks. Mojavi is the first that is developed to play to PHP's strengths.

    Check it out. You might be surprised.

  14. #14
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And if you use AJAX, wait until you've seen RJS Templates

  15. #15
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    Manchester
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Luke, thanks for your comments. I'll check out the references you've given me, and already have a load of questions lined up.

    Quote Originally Posted by Luke Redpath
    And if you use AJAX, wait until you've seen RJS Templates
    Why not just swap out the default rendering model for one that outputs JSON? I mean, its just the same layer that outputs XML, just outputting data in a different format.

  16. #16
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by neobuddah
    Why not just swap out the default rendering model for one that outputs JSON? I mean, its just the same layer that outputs XML, just outputting data in a different format.
    Presumably because a) it keeps things nice and simple and b) it follows the "one-language-to-rule-them-all" principle, being that it uses Ruby.

    Quote Originally Posted by neobuddah
    From the examples I've found online I was under the impression that RoR's built-in AJAX support actually output raw JS. This is terrible, as JS should be abstracted to the behaviour layer and kept completely seperate from the model and presentation.
    I can't disagree with you there and the embedding of Javascript directly in the HTML is a weak point of Rails' AJAX implementation. However, Rails does still make it easy to specify alternative actions for people without JS and the concept of easier maintenance through separation is less of an issue because of the template helpers Rails provides.

    That said, it would be nice to see something like the behaviour library built in, for example. There is some discussion on this here:

    http://article.gmane.org/gmane.comp....by.rails/32447

    Of course, there is the issue of how to collect all generated JS statements and place them into the head. Its not a simple task. Also, this is only a problem if you are using the built-in Rails helpers. There is nothing stopping you from implementing AJAX using your own functions (with the help of the Prototype library) and placing your own hooks into your markup (probably using the class attribute).

    Quote Originally Posted by neobuddah
    I have very specific ideas on the way I want/need to develop my apps. XSLT is a must. XML output without having to hard-code anything is a must. Being able to switch output from XML to JSON/YAML is a must. The ability to implement a very simple REST interface to my apps is a must. Same for XML-RPC and SOAP. The ability to work with persistance layers other than SQL is a must.

    Quick research into RoR/Ruby has yeilded little result when I take into account the above requirements.
    It's quite clear that out of the box, Rails isn't very suited to your requirements, although personally I find some of them a bit strange. I like to KISS and Rails lets me do just that. Regarding the web services layer, have you looked at ActionWebService?

  17. #17
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    Manchester
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Luke Redpath
    Presumably because a) it keeps things nice and simple and b) it follows the "one-language-to-rule-them-all" principle, being that it uses Ruby.
    Sorry, I'm thinking in Mojavi terms. There's a abstract rendering object which is extended with whatever rendering object is required, the default being intermixed PHP/HTML (similar to the way RoR does things). I've just set up a couple of special rendering classes - XML/JSON/YAML - which I can switch between by passing a parameter. A filter picks it up and switches from the default renderer (XML in my case) to JSON or YAML. So when I'm doing AJAX calls I don't have to do any rendering work (not even XSLT), as I just switch to returning a JSON representation of my "output" object.

    I'll have to look into whether I can do the same using RoR. If I can, then I'm sure I'll find it just as useful as Mojavi.

    I can't disagree with you there and the embedding of Javascript directly in the HTML is a weak point of Rails' AJAX implementation. However, Rails does still make it easy to specify alternative actions for people without JS and the concept of easier maintenance through separation is less of an issue because of the template helpers Rails provides.

    That said, it would be nice to see something like the behaviour library built in, for example.
    Thats probably the main thing I like about Mojavi compared to all the other frameworks I've looked at - its simplicity. There's no "goodies" built-in to detract from doing things correctly. Its the lightest MVC I've come across, keeping things like AJAX/Persistance/Interfaces out of the core so the developers can just get on with building things correctly and not have to worry whether that bit of JS that the model's outputting automatically is going to work in Opera and Safari. That's for later on when the app's working.

    There is nothing stopping you from implementing AJAX using your own functions...
    Good. I've already got my own framework for AJAX, which is framework independant. I've always found it worth while to keep my layers completely seperate, just in case I need to swap them out (which I've had to do in the past).

    I like to KISS and Rails lets me do just that.
    Mojavi gives me the same freedom. Splitting off my layers to such an extent means that I can swap each one out if there's a problem and not have to worry about re-coding everything.

    Can you imagine completing a project in RoR and AJAX to find that your client's been taken over by a bigger company with strict SOPs who then state that the app has to be re-done in PHP? Nightmare, let me tell you. If you can just re-code your MVC and leave the presentation and behaviour layers alone its not so much work.

    Lots of people think KISS means keeping it as simple as possible. If that were true, we'd all be coding proceedurally with no test cases. KISS should be thought through just as much as the problem/project itself: "How can I be 'lazy' and get the job done? How can I limit having to re-work large parts of the project if a tech turns out to be a dud? How can I keep the client interested (always my favourite)?". There's lots more questions like this I've collected over the years that I ask myself before every project, and I think I'm a better developer because of it.

    I'm going have to delve into RoR to see whether I can implement some extensions to the core so I can fulfill my requirements. Ruby is a great language, and if I can I can see a switch to RoR in the near future!

  18. #18
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Amrita2 doesn't separate anything, it just shifts some HTML generating stuff to places where it doesn't belong. Your model/controllers shouldn't depend on your view. Your view should collect data from your controllers and modeld, but the controllers and models shouldn't be aware of it.

    But ontopic:

    PHP Code:
    public $has_many "notes"
    Seems terribly wrong.

    PHP Code:
    public $belongs_to = array("assoc1" => array("foreign_key"=> "weird_key"),
                               
    "assoc2" => null,
                               
    "assoc3" => array("conditions" => "age > 25"),
                               
    etc ...
                              ); 
    Is even worse. Ugly hacks compared to Rails.

    But PHP has 1 advantage: more hosting services available.

  19. #19
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    Manchester
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fenrir2
    PHP Code:
    public $has_many "notes"
    Seems terribly wrong.
    Why does it? Doesn't Java do it that way? Perl does it similar. Are they wrong? Doesn't C++ do it the same? I believe D does.

    Just looking through Why's poignant guide to ruby it seems as though variables with capitals in them are actually constants. This can't be right, can it? Typing variables using CamelCase is common practice among developers. It saves having to mess about with the ugly underscore so much. (And yes, I know that built-in functions in PHP use underscores, but when using OOP in PHP you tend to hardly use them).

    So, if I wanted to use:
    Code:
    isSuccess = true;
        if db.saveRecord.== false do
        	isSuccess = false;
     end
    This will throw an error because isSuccess is actually a constant? Maybe I've got it wrong, but that seems wrong to me.

    If constants just depend on the first character being uppercase, then great. Otherwise... I can see myself getting very annoyed every quickly.

    We all get comfortable with the syntax we use the most. I'm sure if I use ruby a lot, I'll become very comfortable with it. Then when I start to learn OCaml, I'll want to shoot every OCaml developer in the head and announce Ruby as the true overlord.

  20. #20
    SitePoint Wizard
    Join Date
    Jan 2005
    Location
    Denmark
    Posts
    1,222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fenrir2
    ... Your model/controllers shouldn't depend on your view. Your view should collect data from your controllers and modeld, but the controllers and models shouldn't be aware of it.
    If you're referring to the Model-View-Controller this is not correct. The controller will indeed know about the structure of the view. In the classic MVC pattern (as pioneered by smalltalk) the controller is responsible for view-specific tasks such as shifting focus, repopulating selection lists of dependant fields, guessing default values etc. All of which requires that the controller "knows" about the view structure, hence the controller will not only depend (in the UML sense) on the view, but it will often hold a reference to the current view.

    On the model I'd agree: The model should know nothing about views or controller. It should expose properties and events for the controller or view to use as they see fit.
    /mouse

  21. #21
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wasn't talking about the underscore ;-)

    ThisIsASampleSentenceCanYouReadIt?

    this_is_a_sample_sentence_can_you_read_it?

    Ruby is about readability, and the second one is much easier to read than the first. And that's why Ruby uses underscores.
    PHP mixes underscores with camelcase in function names. strpos() str_replace(): hard to remember.

    Compare:
    Code:
    string = "this is a string"
    string.include? "string"
    string['string'] = "new string"
    With:
    Code:
    $string = "this is a string";
    strpos($string, 'string') !== false;
    str_replace("string", "new string", $string);
    I have to remember:
    1. base string for strpos is the first argument
    2. base string for str_replace is the last argument
    3. not str_pos, but strpos and not strreplace, but str_replace

    This is much easier in Ruby. Replacing a part of a string is similar to replacing part of an array. Checking if a string contains another string is similar to do such a check on an array:

    Code:
    countries = ['england', 'united states', 'canada']
    countries.include? 'england'
    countries[1] = 'holland'
    Ruby's variable naming:
    Code:
    local_variable = 4
    Constant = 4
    @instance_variable = 4
    @@class_variable = 4
    PHP
    Code:
    $localVariable = 4; // there is no global standard, so $local_variable is ok too
    define('Constant', 4); // function to set constant, eek
    $this->instance_variable = 4; // php uses $this. Ruby doesn't mix methods with properies: everything is a method for the outside world.
    // php doesn't have class variables?
    But you can use pascal/camelcasing if you want:

    Code:
    @instanceVariable
    This is what I originally meant:

    Code:
    public $has_many = "notes";
    vs
    Code:
    has_many :notes
    and

    Code:
    public $belongs_to = array(
    "assoc1" => array("foreign_key"=> "weird_key"),
    "assoc2" => null,
    "assoc3" => array("conditions" => "age > 25"),
    );
    vs
    Code:
    belongs_to :assoc1, :foreign_key => 'weird_key'
    belongs_to :assoc2
    belongs_to :assoc3, :conditions => 'age > 25'
    Rails is much cleaner: you're adding associations, you're not setting class/instance variables.

    Ruby is almost always shorter and more readable.

    Translate this into PHP:

    Code:
    b = true
    list = ('aa'..'zz').select{b = !b}
    List is an array of two strings:
    Code:
    ab
    ad
    af
    ..
    zz
    Who can do that in less than 7 lines in php? And in less than 15 lines in java?
    (1 thing per line, not:
    Code:
    $b = true; $arr  = array(); $str = 'aa'; while($str != 'zz') { $arr[] = $str; $str++; $str++; }
    )

  22. #22
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    Manchester
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, I'm starting to get the picture now. The syntax looks good, and its good to KISS. If I use the following code:
    Code:
    isSuccess = true;
    am I creating a constant or a variable?

  23. #23
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A variable. Constants start with a capital letter.

    Code:
    IsSuccess = true
    IsSuccess = false
    Will not work because "I" is a capital letter.

  24. #24
    SitePoint Zealot ChrisCarter's Avatar
    Join Date
    May 2004
    Location
    Wenatchee, WA
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Give this site a shot neobuddah:

    http://tryruby.hobix.com/

    It'll give you an interactive introduction to Ruby. Kind of fun too

    I think the 'public has_many = "notes"' argument is a little misleading, as Rails is actually using functions (simply without the parenthesis), just as PHP could:

    Code:
    has_many("notes");
    Still not as elegant as Ruby's Symbols, but not as cumbersome as setting variables a million times either.

    Also, I believe you can capitalize class and instance variables without creating constants:

    Code:
    @InstanceVariable
    @@ClassVariable

  25. #25
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think PHP could do that with a function because PHP cannot dynamically add methods to classes from within the class definition.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •