Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm pretty good with PHP, but the one thing I've never understood completely is classes. I've used a few (such as class.upload.php) but have fumbled my way around and more out of a monkey see monkey do approach.
Can anyone point me to some good tutorials that explain how these suckers work and how they function? I'd really appreciate it!
Thanks in advance
Nettuts: Object-Oriented PHP for beginners
That's a good startting point. They have a lot of these tutorials actually.
Also a good idea is, to just go to your bookstore, and see what's lying around there.
I still prefer actual paper to screen reading. Also makes it easier to annotate.
The rest will come with time.
After you understand the basics, it would be a good time to further read into OOP design patterns. Start with the singleton, as I feel like that is the easiest to grasp.
http://www.informit.com/articles/article.aspx?p=346958&seqNum=4
http://net.tutsplus.com/articles/general/a-beginners-guide-to-design-patterns/
Tutorials won't help you. I'm exactly where you are, but found out that tuts really don't tell you the why and what of things. Only the How.
I really recommend you buy a book. Prentice Hall PHP Power Programming is one excellent book.
www.php.net has awesome resources for these types of things:
http://php.net/manual/en/language.oop5.php
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I've recently discovered that using references in PHP is generally (although not always) a bad idea from a memory management or performance point of view, because of Copy On Write and the way that variables are represented under the hood using zvals.
Can someone offer a fuller explanation? I have seen this link posted a few times on Stack Overflow: http://schlueters.de/blog/archives/125-Do-not-use-PHP-references.html
I also found this reference, which goes into a bit more detail about zvals and how they work. It's in French though, although Google does a pretty good job of translating it: http://julien-pauli.developpez.com/tutoriels/php/internals/variables/
I'm surprised there isn't any more, or better documentation on this, and I wondered if any other Stack Overflow users have come across any clearer or more accessible documentation that I haven't been able to find?
Sara Golemon has an interesting article at http://blog.golemon.com/2007/01/youre-being-lied-to.html
The moral of the story
Assigning values by references when you don't need to ... is NOT a
case of you outsmarting the silly engine and gaining speed and
performance. It's the opposite, it's you TRYING to outsmart the engine
and failing, because the engine is already doing a better job than you
think.
And some background on zvals in general. But both these are a bit old. Not sure how much has changed over the years.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Does anyone know of a lemmatizer in PHP? Or, at worst, some way to use a lemmatizer in another language (python NLTK, for instance?) in a PHP webapp?
I'm building a macro-etymological analyzer and I've encountered this issue where the etymological database doesn't contain conjugated words. A lemmatizer would correct this, I think, by giving me the word "say" when the dictionary can't find "said," and returning "good" when the dictionary can't find "better," etc.
Note: a stemmer wouldn't do the same thing as a lemmatizer.
Does this help?
http://tartarus.org/~martin/PorterStemmer/php.txt
It's a PHP5 implementation of the Porter Stemmer algorithm.
i googled this:
http://pastebin.com/WNvb2zB4
and this.
http://tartarus.org/~martin/PorterStemmer/php.txt
dunno if any of them works.
Isn't a https://github.com/heromantor/phpmorphy is what you looking for?
Lemmatisation is relatively more complicated as compare to stemming, that is why it's harder to find some ready and free solution.
I see nobody answered the sub question.
some way to use a lemmatizer in another language (python NLTK, for instance?) in a PHP webapp
The php has at least exec and calls alike. One can simply run any external script or app.
there are some "lemmatizers" in php that could be found in internet, but at a quick check these are turn to be are "stemmers".
Make sure, Stemming won't do for you. Make sure the solution you already have in mind in other language is a Lemmatizer.
I suspect all solution that close to this naming would be in C-like languages. In case those are Open source or provided as libs you could build them into PHP as an extension.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Hi I want to learn Magento, I am doing PHP for almost 2 years learn CMS and framework. Now want to learn Magento but I do not found any solid source to understand functionality and DB structure of magento. If any one can give me some books name or good article that will be very helpful thanks..
The best way to learn Magento is to solve issues as you go along. Maybe a good place to start is this:
http://www.magentocommerce.com/knowledge-base.
Also the guys at siteground did a nice thing with this: http://www.siteground.com/tutorials/magento/
Other than this, maybe you should actually start working on a task and when you hit a brick wall (this should happen very fast), just see how other people solved the issues.
As for database structure, maybe you should read about the EAV paradigm. This is how the products, categories and customers are stored in the DB.
If you insist on a database structure here it is...but good luck with that.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am using python with django. There I can simply make form from models and also it had builtin Admin.
I am eager to know corresponding framework for PHP with all this facilities.
I have encountered lot some similar questions like this, but they had not compared the frameworks with django. Experts Please Suggest.
I'd try Symfony.
What you're referring to sounds like "scaffolding"
I've had good success with Zend in the past. It has a lot of functionality in its libraries and it is all completely decoupled, so you can use whichever parts best fit your task, leaving out other things all together.
It doesn't have built in admin, but I like CodeIgniter. It really gives you freedom with your code without getting in the way.
I like Yii. It's based on the Model-View-Controller pattern, like most of the other PHP frameworks mentioned here. It uses templates, can do scaffolding, etc...
Another one that once saved my ass in a project with close deadline was CakePHP
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
What tutorials or guides about features/techniques influenced the way you did something.
Eg a compelling tutorial (located here) about unit testing got you into unit testing. Your code improved dramatically.
The most influential document that I have used for PHP is manual itself. Call me old fashioned.
I think some of the most important "documentation" that helped me improve some parts of my code / coding are :
documentations from Frameworks / libraries, and the source code of some of those : they showed me how useful it is to have a well-presented well-structured well-commented well-organized code.
About those, I could say the manual and sources of MVC Frameworks tend to show great stuff, sometimes (inheritance, interfaces, design patterns, ... things you only hear about at school -- or at least it was the case when I was at school ^^ )
code reviews / peer reviews at work
both when my code was under review : advices from more experienced colleagues are always great, when you're willing to learn
and when I am the one reviewing code : you always learn new stuff when reading other's people code, and being able to discuss about it really is great !
The community : I read (even if often quite only rapidly) lots of blog-posts, and those are often written by people with lots of experience, who want to share great stuff
One nice source of those, for PHP of course, is Planet PHP ; just subscribe to the RSS feed ^^
But there are plenty more, not only about PHP !
Conferences are also a nice way to meet people, discuss with them, and learn from them