|
home | manual | reference | regression | sequence | develop | apps |
Reference - Parms functions - upper
App: check - Page: fragments/pipes_1
PHP
fragments/pipes_1.phpHTML
fragments/pipes_1.padResult <?php
$name = 'john doe';
$email = 'ALICE@EXAMPLE.COM';
$price = 1234.56;
?><p>Original: {$name}</p>
<p>Uppercase: {echo $name | upper}</p>
<p>Capitalize: {echo $name | ucwords}</p>
<p>Original: {$email}</p>
<p>Lowercase: {echo $email | lower}</p>
<p>Original: {$price}</p>
<p>Formatted: {echo $price | number_format(2)}</p>Original: john doe
Uppercase: JOHN DOE
Capitalize: John Doe
Original: ALICE@EXAMPLE.COM
Lowercase: alice@example.com
Original: 1234.56
Formatted: 2
App: check - Page: fragments/pipes_2
PHP
fragments/pipes_2.phpHTML
fragments/pipes_2.padResult <?php
$items = ['apple', 'banana', 'cherry'];
?><p>Items separated by commas:</p>
<p>{items glue=", "}{$items}{/items}</p>
<p>Items in uppercase:</p>
<ul>
{items}
<li>{$items}</li>
{/items | upper}
</ul>Items separated by commas:
applebananacherry
Items in uppercase:
- APPLE
- BANANA
- CHERRY
App: check - Page: fragments/pipes_3
PHP
fragments/pipes_3.phpHTML
fragments/pipes_3.padResult <?php
$rawText = ' hello world ';
$message = 'the quick brown fox';
?><p>Chain multiple pipes together:</p>
<p>Original: [{$rawText}]</p>
<p>Trimmed and uppercase: [{echo $rawText | trim | upper}]</p>
<p>Original: {$message}</p>
<p>Uppercase first letter of each word: {echo $message | ucwords}</p>
<p>Replace and uppercase: {echo $message | replace('fox', 'dog') | ucwords}</p>Chain multiple pipes together:
Original: [ hello world ]
Trimmed and uppercase: [HELLO WORLD]
Original: the quick brown fox
Uppercase first letter of each word: The Quick Brown Fox
Replace and uppercase: The Quick Brown Dog
App: check - Page: fragments/pipes_4
PHP
HTML
fragments/pipes_4.padResult {data 'message'}Hello World{/data}
<p>Opening tag pipe (processed BEFORE): {message | lower}Content: {$message}{/message}</p>
<p>Closing tag pipe (processed AFTER): {message}Content: {$message}{/message | upper}</p>Opening tag pipe (processed BEFORE):
Closing tag pipe (processed AFTER):
App: check - Page: miscellaneous/eval
HTML RESULT {echo 50 * 4 * 2}
{echo 50 | * 4 | * 2}
{echo 50 | @ * 4 | @ * 2}400 400 400{echo 50 | '"' . }
{echo 50 | . '"' }
{echo 50 | '"' . @ . '"' }
{echo 50 | '"' . $$ . '"' }"50 50" "50" "50"{echo 50 | '"' . '"' }
{echo 50 | '"' . . '"' }
{echo 50 | . @ . }
{echo 50 | . }
{echo 50 | . . }"" "5050" 505050 5050 505050{set $abc = 50}{$abc | * 4}
{$abc | 4 * 4}
{$abc | * / 4}
{$abc | * 4 / 2 + 10}
{$abc | * 4 | / 2 | + 10}200 16 625 110 110{set $abc = 'abc'}{$abc | crc32}
{$abc | app:substr (1, 1)}
{$abc | pad:substr (1, 1)}
{$abc | php:substr (@, 1, 1)}891568578 b b b{set $line = 'a <test> LiNe'}{$line}
{!line}
{$line | capitalize}
{$line | upper}
{$line | lower}
{$line | url}a <test> LiNe aLiNe A <test> LiNe A <TEST> LINE a <test> line a+%3Ctest%3E+LiNe {set $nbr = 12345.678}{$nbr | %.2f}
{$nbr | %.5f}
{$nbr | %'.09d}
{$nbr | %d}
{$nbr | %e}
{$nbr | %f}
{$nbr | %g}
{$nbr | %o}12345.68 12345.67800 000012345 12345 1.234568e+4 12345.678000 12345.7 30071
|
home | manual | reference | regression | sequence | develop | apps |
(c) 2003-2025 Herbert Groot Jebbink