rspec/rules/S2041/php/rule.adoc

19 lines
408 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
``++echo++`` can be called with or without parentheses, but it is best practice to leave parentheses off the call because using parentheses with multiple arguments will result in a parse error.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
echo("Hello"); // Noncompliant, but it works
echo("Hello", "World"); // Noncompliant. Parse error
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
echo "Hello";
echo "Hello","World!";
----