A
A
Andrey Tokmakov2015-05-29 07:24:56
Yii
Andrey Tokmakov, 2015-05-29 07:24:56

What is the difference 4 spaces vs Tab?

Was reading "Yii2 Core framework code style" ( https://github.com/yiisoft/yii2/blob/master/docs/i... )
Stumbled upon

Code MUST use 4 spaces for indenting, not tabs

What is the fundamental difference between 4 spaces and tab? Why are spaces better?
It seems that he always saw everywhere that they put spaces, instinctively also put spaces, but only now he asked himself these questions.
UPD: In general, it's clear, thanks to everyone for participating

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2015-05-29
@NPC

It's time to stop using tabs in code
It's time to stop using spaces instead of tabs...
a hot topic: whoever likes what, each method has its supporters and opponents.

A
Arman, 2015-05-29
@Arik

From my own experience, different editors show tabs in different ways, some are very short, some are half the screen, and a space is also a space in Africa.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question