S
S
Sergey Shitov2017-08-13 17:08:20
PHP
Sergey Shitov, 2017-08-13 17:08:20

Is there an editor with dev code capability?

There is an editor that can save (or similar actions) 2 types of code.
The first is general, and the second is general + additional.
The bottom line is that I want to make 2 versions of one script and in one of them each step will be logged.
For example:

*$log = 'Приветствие';

echo 'Hello, world!';

*var_dump(
*    $log
*);

Anything that has a "*" in front of the string will not get into one of the script versions.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Vladimirovich, 2017-08-13
@ftugit

git with branches

A
Alexey Skobkin, 2017-08-13
@skobkin

You should read about logging levels .

T
ThunderCat, 2017-08-13
@ThunderCat

define ("debug", true);
function debug($var, $comment){
     if(debug){
         echo "// $comment //\n";
         // do debug stuff
     }
     return;
}

In production, set to false -> profit!
Or, if you read your answer about the absence of anything in one version - git with separate branches .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question