mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-09 23:46:37 +02:00
Use strict equality comparison when comparing ints
This isn't a bug, per se, but bring strict is "the right way" and important to get right in a code example here.
This commit is contained in:
@@ -26,7 +26,7 @@ Let's write a simple "Hello, $name" CLI program. To try it out, create a file na
|
|||||||
|
|
||||||
{% highlight php %}
|
{% highlight php %}
|
||||||
<?php
|
<?php
|
||||||
if ($argc != 2) {
|
if ($argc !== 2) {
|
||||||
echo "Usage: php hello.php [name].\n";
|
echo "Usage: php hello.php [name].\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user