Reference - Parms functions - strrev


App: manual - Page: fragments/expressions_32


App: regression/framework - Page: functions/the_space_form_pipes_through_an_application_or_a_php_function
PHP
HTML
functions/the_space_form_pipes_through_an_application_or_a_php_function.pad
Result
[{echo 'abc' exclaim}][{echo 'abc' strrev}]


App: regression/framework - Page: prefixes/php_over_a_variable
PHP
HTML
prefixes/php_over_a_variable.pad
Result
{set $s = 'ab'/}
{echo php:strrev($s)}


App: regression/framework - Page: prefixes/php_reaches_a_function_the_list_names
PHP
prefixes/php_reaches_a_function_the_list_names.php
HTML
prefixes/php_reaches_a_function_the_list_names.pad
Result
<?php

$padPhpFunctions
= [ 'strrev' ];

?>
{echo 'abc' | php:strrev} {echo 'abc' | strrev}


App: regression/pages - Page: request/tagnames
PHP
request/tagnames.php
HTML
request/tagnames.pad
Result
<?php

// Fixture for a_request_value_never_decides_what_a_tag_is: a constant, pipe functions, two
// sequences, a _data file, an application pipe function and PHP functions written as tags
// and pipes - and $ucwords, a variable the page sets itself, which stays the field it is, as
// $date does, given a default that keeps the request's value when one came. Fetched bare it
// answers what the template means by each name.

$ucwords = 'mine';
$who = $who ?? 'nobody';
$date = $date ?? '2000-01-01';

// A name in a comment, a string or a function's parameter is none of the page's: $upper
// here, '$fibonacci' and $nums below stay the template's, and so does the closure's local
// $exclaim behind a binary string.

$tagNamesText = 'the $fibonacci sequence';
$tagNamesBinary = b"a binary string for $who";
$tagNamesLocal = function ( $nums ) { $exclaim = 1; return $nums; };

?>
[{PHP_INT_SIZE}][{upper}abc{/upper}][{fibonacci rows=3}{$fibonacci}{/fibonacci}][{prime rows=3}{$prime}{/prime}][{nums}{$nums}{/nums}][{exclaim}hi{/exclaim}][{echo 'abc' | strrev}][{strtoupper 'x'}][{ucwords}][{who}][{date}]