Case-sensitivity of identifiers: Difference between revisions

→‎{{header|PicoLisp}}: Added PHP Example
(Replace println() with print())
(→‎{{header|PicoLisp}}: Added PHP Example)
Line 1,113:
The three dogs are named Benjamin, Samba and Bernie
</pre>
=={{header|PHP}}==
<syntaxhighlight lang="PHP"><?php
 
// In true PHP style, this example is inconsistent.
// Variable identifiers are case sensitive
 
$dog = 'Benjamin';
$Dog = 'Samba';
$DOG = 'Bernie';
 
echo "There are 3 dogs named {$dog}, {$Dog} and {$DOG}\n";
 
// Whereas function identifiers are case insensitive
 
function DOG() { return 'Bernie'; }
 
echo 'There is only 1 dog named ' . dog() . "\n";</syntaxhighlight>
 
=={{header|PicoLisp}}==
<syntaxhighlight lang="picolisp">(let (dog "Benjamin" Dog "Samba" DOG "Bernie")
Line 1,118 ⟶ 1,136:
Output:
<pre>The three dogs are named Benjamin, Samba and Bernie</pre>
 
=={{header|PL/I}}==
<syntaxhighlight lang="pli">*process or(!) source xref attributes macro options;
3

edits