PHP website design issues

Source: Internet
Author: User
Tags php website
Tsingyuan.cn: PHP is embarrassing. It is so broken, but those amateurs who have been trained are praising it. Php is doing some restoration measures, but I chose to forget it. Preface my temper is strange. I will complain a lot. I don't like most technologies on this planet. PHP not only introduces PHP website design issues comprehensively

Tsingyuan.cn prompt: php is embarrassing. It is so broken, but those amateurs who have been trained are praising it. Php is doing some restoration measures, but I chose to forget it.

Preface
My temper is odd. I will complain a lot. I don't like most technologies on this planet.
PHP is not only awkward to use, but also does it violate my beliefs. I can tell you about a language, all the good ways I want to avoid, and all the bad ways I like. Come on, ask! The conversation will be interesting!
Php is the only exception. Almost everything abstracted by php is fragmented. Language, framework, and the entire ecosystem are all in a mess. I can hardly list cursing alone, because it's all broken. Every time I plan to edit a bunch of messy php complaint lists, I get all messed up by some trivial matters. the deeper I get, the more shocking I find.
Php is embarrassing. It is so broken, but those amateurs who have been trained are praising it. Php is doing some restoration measures, but I chose to forget it. But I have to let my system get rid of these things. that's the last attempt.


A metaphor

I complained casually, but she insisted that I publish it.
I can't even tell you what happened to PHP, because-okay. You have a toolbox. A bunch of tools. It looks good. There are standard things.
When you pull the screw, it has three weird heads. Okay, well, this is not very useful to you, but you guess it will be useful one day later.
You took out your head and got shocked. There were sharp claws on both sides. But it can still be used. I mean, you can use the center of the two sides to oblique.
You take out the vise, but they do not have a sawtooth surface. The surface is flat and smooth. This is useless, but still usable.
You can continue. Everything in the toolbox is weird and unpredictable, but it cannot be said that there is no value. There is no major problem as a whole; its tools are complete.
Now, I think there are many carpenter who use these tools. they say to you, "What's the problem with these tools? We have used them. they work very well !". The craftsmen show you the house they built. every door is a pentagon, and the roof is down. You knocked on the front door and it looked inside, but they complained that you broke their door. This is the PHP issue.


Position
I think the following traits are important for the productivity and availability of a language, and PHP is destroying them in a wide range. If you don't agree, well, I can't imagine that we will never reach an agreement.
A language must be predictable. It is a medium for reflecting human thoughts on computer execution. Therefore, the key to it is that human understanding of programs must be correct.
The language must be consistent. Similar things must look similar. The difference is that they are different. After learning some of the language knowledge, you should be able to easily understand the rest.
The language must be concise. New languages should reduce the bad form of inheriting old languages. (We can also write the machine code .) Of course, efforts should be made to avoid weaving into new unique forms.
The language must be reliable. Language is a tool to solve the problem. try to avoid introducing new problems. Any "trap" will be a lot of distracting.
The language must be debuggable. When an error occurs, the programmer must correct it and we need help.
My position is:
PHP is full of surprises everywhere: mysql_real_escape_string, E_ACTUALLY_ALL
PHP inconsistency: strpos, str_rot13
PHP requires a special form: error-checkingaroundcapicils, ===
PHP odd: =. For ($ fooas & $ bar)
PHP obscure: no stack trace or fatals by default. for complex error reports, I cannot explain why it falls into these classes for a single problem. Otherwise, it will not end up. I believe that readers will think for themselves.


Don't talk to me any more.
I know many favorable points. I have heard a lot of arguments. These can only stop the conversation immediately. Don't talk to me about these things any more. please.
Do not say "good developers can write good code in any language" or "bad developers" to me .. Let's go. This is meaningless. Good craftsmen can drive nails with stones or hammers, but how many craftsmen have you ever seen using stones? One of the criteria for becoming a good developer is to be good at selecting tools.
Don't tell me that it is the responsibility of developers to memorize thousands of exceptions and odd behaviors. Yes, this is necessary in any system, because the computer is silly. This does not mean that the system can accept it frantically without limits. PHP only has exceptions. this is not acceptable. once you fight against the language, you will have to spend more effort to write the program. My tools cannot play a positive role in creating applications for me. Don't say "that is the way CAPI works" to me ". What is the purpose of the existence of advanced languages on the planet? what are the purposes of providing all just some string helper functions and a bunch of C wrapper? If so, use C! Here, there is even a CGI library for it.


Don't tell me "you deserve something strange ".

If there are two features, some people will find a reason to use them together one day. Again, this is not C; there is no specification here, and "undefined behavior" is not required here ". Don't talk to me about Facebook or Wikipedia and use PHP. I knew it! They can also use Brainfuck to write, but as long as they are enough to accompany Ming and constantly toss these things, they can always overcome platform problems. As we all know, if you write in other languages, the development time may be halved or doubled; it is meaningless to extract the data separately. God bless, don't talk to me any more! If the list does not hurt your PHP opinion, it doesn't matter, so please stop making meaningless arguments on the Internet and continue to develop the site of cool and handsome to prove that I am wrong.

Secretly tell you: I like Python very much. I am also happy to say something you don't like, if you really want. I don't want it to be perfect. I just want to develop strengths and circumvent weaknesses and summarize what I want best.


This article is from the "Qingyuan education" blog. For more information, see here. thank you! Log on to Qingyuan education official website to view more video tutorials.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.