Answer the question
In order to leave comments, you need to log in
Do you clean comments in PHP code for optimization?
I suppose that many will now teach me that PHP is compiled into opcode and executed from there, and comments are ignored in the opcode.
but there is a small nuance, comments that open with / ** before class methods and properties are regarded as annotations and can be obtained through reflection, that is, they must be in the opcode.
example
<?php
class A
{
/**
* тут много много разного текста
*/
public $a;
}
echo memory_get_usage();
Answer the question
In order to leave comments, you need to log in
1) Symphony already compiles most of the kernel files in app[Env]Kernel into the app folder
2) Considering that a significant part of the application logic is built on the basis of annotations, deleting them is comparable to deleting the source code.
It will also be faster by 0.001 % and everything will break in the same way
. Such thoughts are a relic of the times of php 4, now it's easier to install php 7 than to trash the sources (which, by the way, will have to be "cleaned" every couple of weeks by hand, because kernel updates do not go anywhere).
And it's even easier to disable some bundle or rewrite one heavy sql \ dql query - it will be much more profitable in terms of speed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question