rspec/rules/S2041/php/rule.adoc

36 lines
686 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
2022-02-04 17:28:24 +01:00
[source,php]
2021-04-28 16:49:39 +02:00
----
echo("Hello"); // Noncompliant, but it works
echo("Hello", "World"); // Noncompliant. Parse error
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
2022-02-04 17:28:24 +01:00
[source,php]
2021-04-28 16:49:39 +02:00
----
echo "Hello";
echo "Hello","World!";
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]