PHP Polymorphic Thoughts Primer Tutorial

PHP Polymorphic Thoughts Primer Tutorial

PHP Polymorphic Thoughts Primer Tutorial

We have mentioned the word “polymorphic” at this blog … and we weren’t sneezing m’lord … and you may wonder with the avid PHP fan base here why we don’t talk about “polymorphism” regarding PHP?

Or maybe not … but if you are still here … it is because PHP does not worry about the type of a variable in its function (or class’s method) parameter list … why should it? … it is sooooo generous … but seriously … you either like this, as you go through the world of programming and coding, or not … happens that I love it … because I like substitution and interpretation … but maybe you don’t … anyway … the cute “polymorphic” strengths of other OOP languages such as C++ (refer to Xcode Objective-C Polymorphic Array Primer Tutorial) is compensated, in a kludgy way, admittedly, with PHP, via the use of the family of functions like …

The beauty and elegance of C++ about this is to be admired, but the brevity of PHP is also admirable, as one function, admittedly a long function/method can handle the whole shebang, given the right shebang’er, that it … just feel like saying “suffering succotash”.

Anyway, try out a live run or see the PHP source code you could call add.php (for which this link was great help … thanks).

Hope you get a little bit of an inkling of a notion out of today’s thoughts.


Previous relevant Xcode Objective-C Polymorphic Array Primer Tutorial is shown below.

Xcode Objective-C Polymorphic Array Primer Tutorial

Xcode Objective-C Polymorphic Array Primer Tutorial

Have you heard of Objective-C? It is a great object-oriented programming language that builds that object orientation on top of a C programming base. Sounds good (even better than good), and Objective-C is the language of iOS Mobile Apps, so it is definitely in the category of up and coming programming languages. Let’s see what Wikipedia says about it below.

Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. It is the main programming language used by Apple for the OS X and iOS operating systems and their respective APIs, Cocoa and Cocoa Touch.

Originally developed in the early 1980s, it was selected as the main language used by NeXT for its NeXTSTEP operating system, from which OS X and iOS are derived.[1] Generic Objective-C programs that do not use the Cocoa or Cocoa Touch libraries, or using parts that is ported or reimplemented for other systems can also be compiled for any system supported by GCC or Clang.

In this primer tutorial we see how Xcode can supervise an Objective-C Desktop Application project to define a Polymorphic Array, and call the methods this array points to.

Previous C++ XCode OOP Polymorphic Array Tutorial is of interest for compare and contrast purposes and is shown further below.

Regarding this Objective-C Polymorphic Array tutorial topic I really like โ€œObjective-Cโ€ Visual Quickstart Guide by Steven Holzner.

Also like this link with regard to Polymorphic Arrays.

Here are links to programming source code which shows some use of a Polymorphic Array, which you should rename to main.m

Link to Objective-C more information … via Wikipedia, where quote above came from..


Previous C++ XCode OOP Polymorphic Array Tutorial is of interest for compare and contrast purposes and is shown below.

C++ XCode OOP Polymorphic Array Tutorial

C++ XCode OOP Polymorphic Array Tutorial

Here is a tutorial that introduces you to some more aspects of OOP … oops, forgot to say what OOP stands for … Object Oriented Programming … specifically regarding Polymorphic Arrays.

Object-oriented programming (OOP) is a programming paradigm that represents concepts as “objects” that have data fields (attributes that describe the object) and associated procedures known as methods. Objects, which are usually instances of classes, are used to interact with one another to design applications and computer programs.

To me, the beauty of OOP is that it can relate to the nouns in our life. Think of an object that you can touch, like a wristwatch … it has features like its type of design, its size, its weight (ie. its properties), and it has objects that go to make it up, like cogs and wheels (ie. its components), and it has its related classes of objects like clock, alarm clock, oven timer etcetera (ie. its characteristics), and its more fundamental essence, the class of watch (ie. its inheritance).

In this tutorial we touch on Polymorphic Arrays and the use of an Abstract Base Class and Two Subclasses which contribute to the types within this array. Has some similarities to MultiCulturalism perhaps?

Let’s see some C++ using XCode for this …

Link to Object Oriented Programming information … from Wikipedia from which quote above comes.
Link to Object Oriented Programming inventor information … Kristen Nygaard.
Also like this link with regard to Polymorphic Arrays.
Link to some downloadable programming code … rename to main.cpp for use.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, OOP, Tutorials and tagged , , , , , . Bookmark the permalink.

27 Responses to PHP Polymorphic Thoughts Primer Tutorial

  1. Hi there to every one, as I am actually keen of reading this web site’s post to be updated daily.
    It contains fastidious information.

  2. I have been absent for a while, but now I remember why I used to love this web site. Thank you, I will try and check back more frequently. How frequently you update your site?

  3. Thank you for some other informative site. Where else could I am getting that kind of information written in such a perfect means? I’ve a challenge that I’m just now operating on, and I have been at the glance out for such information.

  4. Leadership says:

    you are in point of fact a good webmaster. The web site loading speed is amazing. It seems that you are doing any unique trick. Furthermore, The contents are masterwork. you’ve performed a fantastic task in this matter!

  5. There is evidently a lot to realize about this. I suppose you made various nice points in features also.

  6. Thank you, I have just been looking for info approximately this subject for a while and yours is the best I’ve discovered so far. But, what concerning the bottom line? Are you positive about the supply?

  7. Hi Health says:

    I have been reading out many of your posts and i can claim pretty clever stuff. I will definitely bookmark your blog.

  8. Used Car says:

    Great blog! I am loving it!! Will be back later to read some more. I am taking your feeds also

  9. Bonjour ! Vraiment bien comme site!!!

  10. Refreshing says:

    Loving the publish.. thankfully My internet surfing seem complete.. thank you. Incredibly beneficial perspective, thank you for expression.. Isn’t it superb whenever you get a good article?

  11. earnest says:

    Supporting the contribution.. thanks a bunch My web browsings seem total.. thank you. So content to possess found this submit.. Honestly effective outlook, thank you for expression..

  12. Thank you a bunch for sharing this with all people you actually understand what you are speaking approximately! Bookmarked. Kindly also talk over with my site =). We may have a link alternate contract between us!

  13. Stock Market says:

    Thank you, I have recently been searching for info approximately this subject for ages and yours is the greatest I’ve found out till now. However, what concerning the bottom line? Are you positive about the source?

  14. Foolproof says:

    Particularly useful viewpoint, appreciate your sharing.. Is not it fantastic if you obtain a very good post? Fantastic thoughts you have here.. Truly valuable mindset, appreciate your sharing..

  15. So content to get discovered this publish.. Really valuable outlook, appreciate your writing.. Terrific opinions you have here.. Definitely effective perspective, thanks for blogging..

  16. helpful says:

    I needed to post you this bit of note to say thanks a lot yet again for your extraordinary secrets you have featured on this website. It has been really tremendously generous with people like you to convey without restraint what exactly a lot of people could possibly have marketed for an e-book to make some bucks for their own end, and in particular seeing that you might have done it in case you decided. Those tactics as well worked as the good way to know that other people have a similar passion like my own to realize good deal more with regard to this matter. I am certain there are numerous more fun times up front for folks who scan your blog.

  17. Common Law says:

    I have been checking out some of your stories and i can state pretty clever stuff. I will make sure to bookmark your website.

  18. Good blog! I truly love how it is easy on my eyes and the data are well written. I’m wondering how I could be notified when a new post has been made. I’ve subscribed to your RSS feed which must do the trick! Have a nice day!

  19. car gadgets says:

    I was just searching for this info for some time. After six hours of continuous Googleing, finally I got it in your site. I wonder what’s the lack of Google strategy that do not rank this type of informative web sites in top of the list. Normally the top sites are full of garbage.

  20. Refreshing says:

    Thank you so much for providing individuals with an exceptionally nice chance to discover important secrets from this blog. It is usually so pleasing and as well , stuffed with a lot of fun for me personally and my office acquaintances to visit your blog at the least 3 times in 7 days to read through the fresh tips you will have. And definitely, I’m just actually motivated for the beautiful concepts you give. Selected 1 areas in this article are in fact the best we’ve ever had.

  21. Hi, Neat post. Thereรขโ‚ฌโ„ขs a difficulty along together with your web site in internet explorer, could check thisรƒยขรขโ€šยฌร‚ยฆ IE nonetheless may be the marketplace chief and a large section of other folks will miss your magnificent writing due to this dilemma.

  22. The next time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my choice to read, but I actually thought youd have something interesting to say.

  23. What i do not realize is in reality how you’re no longer actually a lot more smartly-liked than you might be now. You are very intelligent. You recognize therefore significantly in relation to this subject, made me in my opinion consider it from a lot of varied angles. Its like women and men are not interested except it is one thing to accomplish with Lady gaga! Your individual stuffs great. Always handle it up!

  24. I do believe all of the ideas you’ve presented in your post. They’re really convincing and can certainly work. Still, the posts are very short for novices. May just you please extend them a bit from next time? Thank you for the post.

  25. kijiji phone says:

    This paragraph presents clear idea designed for the new people of blogging, that really how to do blogging and site-building.|

  26. Well I definitely liked studying it. This information procured by you is very helpful for accurate planning.

  27. Thank you for helping out, excellent info. “It does not do to dwell on dreams and forget to live.” by J. K. Rowling.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>