I
I
Ivan Antonov2015-08-10 10:21:50
PHP
Ivan Antonov, 2015-08-10 10:21:50

How to design a php script?

Theoretical question. I was given the task of writing a script. There are many solutions on how to implement it. Therefore, before starting, I would like to design its model, that is, to understand which approach is better to choose and how to implement the code. I don't have a higher technical degree, I'm self-taught. Advise what to read, so as not to make a mistake with the choice, and in the future it was possible to expand the created script.
Or is it all a matter of experience?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Ukolov, 2015-08-10
@antonowano

Perhaps you should start with https://refactoring.guru/ru in order to understand what you will have to face with support in the future and lay the foundations at this stage.
This is, of course, if the script is not 20 lines long :)

S
Sergey Ivanov, 2015-08-10
@Writerim

design + structure + standards

A
Alexey Ostin, 2015-08-11
@nitso

If you are writing a console application, start with a ready-made wrapper, such as Symfony Console . This will give you a good starting point from which you can start dancing, trying different approaches.
If a web application, take a ready-made framework (Symfony, Yii, Laravel, Blues, anything else fresh and supported) and use the proposed architecture.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question