Join 307,138 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,819 people online right now. Registration is fast and FREE... Join Now!
So, as you guys know, we have lots of experts in our PHP forum .we are opening a Q&A session with Dream.In.Code Experts,
We have this week open for collecting the questions from, you, the users of Dream.In.Code. At the end of this week, I will compile a list of the best questions and answers posted here.
Questions should be related to PHP
Please note, that I will only select the most interesting questions, so try avoiding trivial questions, answers on which can be found online. Also, please do not post programming questions on how to do something or to find issues with a piece of code.
Not to be picky or anything but this topic, I think, should be placed in the regular PHP forum since topics placed in the PHP Programmers' forum is supposed to be ( I quote ) "advanced and non-help related"...
After further review we, the DIC Team, decided that this is good idea to have.
@noorahmad: You need to list the PHP guru's that will be answering the users question and I suggest you look at this thread and this thread for a good format to carry this out with
@noorahmad, "why do you prefer PHP over other Web Languages":
Prefer and prefer, I like the way PHP behaves like I want it to instead of it telling me to do things in a particular way like ASP.NET/C# does. This makes it more pleasing for me to work with it because I can do things pretty much however I want to do it. But I must say that PHP has its backfires just like ASP.NET/C# has, and the good sides of PHP are also the bad ones. I think about return-type-hinting and type-safe variables that are currently missing, which at times comes very nice at hand when you want a generic function that could return who knows what(?!). At times though you want to say that a certain method of a class only should return a boolean, because your framework requires it to be a boolean. At the time being you have to make sure it actually is a boolean before treating it as one which requires more lines of code from what it would take to implement the same method in C#.
In short, I prefer PHP over other Web Languages because it is very pleasing to work with and you get nice results fast, but since I think that you should also have the alternative to make your code type-safe when the day comes and it is necessary for your system to work properly I must admit that I prefer ASP.NET/C# over PHP at some special occasions!
Thanks for considering me being a PHP Guru! haha
This post has been edited by Wimpy: 28 Sep, 2009 - 04:32 AM
I'm ambivalent about frameworks. I think they're necessary because so many programmers use procedural techniques and therefore have no structure to their code. That becomes a nightmare when you have to go in after such a coder and make changes. Frameworks force you to use a structure, and that's a good thing.
Should we wait to answer all the questions until after they've been posted? That way we can all address questions and it keeps the same format like previous Q&As. If we all start answering questions it's going to get really confusing really fast.
Mods, any way we can get this pinned to the front page so the thread doesn't die? I'd like to see some questions come in.
I added the list of PHP Gurus, now you can ask your question related to PHP, they will try thier best to answer the questions.
My Question: @All PHP Users: why do you prefere PHP over other Web Languages.
I don't prefer PHP, but I think PHP is good language and the reason of its success it's because it is very easy to learn, many built in functions, great community, many open source projects.
The two things that I don't like about PHP are: - To use the dollar sign every time - Some things are case sensitive but others don't. other thing: - It's much better to use a dot "." than an arrow "->"
- Some things are case sensitive but others don't. other thing: - It's much better to use a dot "." than an arrow "->"
These two things I don't get... I simply don't understand the first one... The second one isn't even a comparison, the period is used for combining terms while the "arrow" is used to get methods/variables from an object...they're not even the same thing...<place good simile here (one that shows how not-even-close-to-related those things are)>
He may have been referring to the inconsistency in case sensitivity between variables and functions. That is, in PHP, variable names are case-sensitive (e.g. $Foo is not the same as $foo), but function names are not.
QUOTE
The second one isn't even a comparison
I believe he meant in comparison to other programming languages. That is, in PHP the arrow is the operator for accessing fields and methods on an object. By contrast, other languages, like Java and C#, use the dot operator for that purpose. Of course, it's a shallow criticism - it's more a matter of personal preference than the cause of any real readability issues. PHP has much deeper problems than that.
Lets let some more questions come in and then all of us answer one in their own individual threads. I can already tell it's going to be a pain in the butt to try to keep track of answers.
I agree with Shanek's comments. I felt the same about the '$' comment. It really seemed shallow and doesn't address PHP's benefits/downfalls. Those comments were more about the syntax of the language than the actual language itself.