what is the mean of + in front of a line in php

diff, php

Solution

It has no meaning, it is superfluous. You can write the exact same statement without the plus:

$array['key1']['key2'] = "value"

If you have that from a unified `diff` file, it means that this line was added. So that plus is not PHP code, it is a marker for that line in the diff/patch. The other marker is minus `-` for removing a line.

Problem

I have a question about syntax in php. What is the mean of + in following line? Thanks! ``` +$array['key1']['key2'] = "value" ```

Original source

Related problems