It can get confusing because a PAD tag can be so many things,
to solve this, use a prefix that gives the tag type.

HTML RESULT
<h3>From an pad tag</h3>

{pad:foo}

From an pad tag

Foo tag from pad
<h3>From an application tag </h3>

{app:foo}

From an application tag

Foo tag from app
<h3>From the {content} tag </h3>

{content:foo}

From the {content} tag

This is from content
<h3>From a PHP function !</h3>

{php:foo}

From a PHP function !

This is a function
<h3>From an own PAD function </h3>

{function:foo}

From an own PAD function

From an own function
<h3>From an defined bool</h3>

{bool:foo}
Bool 'foo' is true
@else@
Bool 'foo' is false
{/bool:foo}

From an defined bool

Bool 'foo' is true
<h3>From a PHP array</h3>

{array:foo}
{$foo} <br>
{/array:foo}

From a PHP array

This is a PHP array - 1
This is a PHP array - 2
This is a PHP array - 3
<h3>A defined constant</h3>

{constant:foo}
{$foo} <br>
{/constant:foo}

A defined constant

This is a constant - 1
This is a constant - 2
This is a constant - 3
<h3>From the {data} tag</h3>

{data:foo}
{$foo} <br>
{/data:foo}

From the {data} tag

This is a json array - 1
This is a json array - 2
This is a json array - 3
<h3>From the local _data directory</h3>

{local:foo}
{$foo} <br>
{/local:foo}

From the local _data directory

From the _data directory - 1
From the _data directory - 2
From the _data directory - 3
<h3>From the local _scripts directory</h3>

{script:foo}

From the local _scripts directory

Hello from foo.py


The list with PAD tag types

action   app   array   bool   common   constant   content   data   field   flag   function   include   keep   level   local   make   pad   php   property   pull   remove   script   select   sequence  

Extra files used

PHP PAD OTHER
_functions/foo.php
<?php

return "From an own function";

?>
_scripts/foo.py
#!/usr/bin/env python3

import sys
import os

me = sys.argv[1:]

print ( "Hello from", os.path.basename(__file__) )
_tags/foo.php
<?php

return "Foo tag from app";

?>
prefix/_data/foo.xml
<xml>
<line foo="From the _data directory - 1" />
<line foo="From the _data directory - 2" />
<line foo="From the _data directory - 3" />
</xml>
prefix/_lib/foo.pad
{content 'foo'}
This is from content
{/content}

{data 'foo'}
[ { "foo": "This is a json array - 1" },
{ "foo": "This is a json array - 2" },
{ "foo": "This is a json array - 3" } ]
{/data}

{bool 'foo'}1{/bool}
prefix/_lib/foo.php
<?php

function foo () {

return
"This is a function";

}

$foo = [ 'This is a PHP array - 1',
'This is a PHP array - 2',
'This is a PHP array - 3'
];

define ( 'foo', [ 'This is a constant - 1',
'This is a constant - 2',
'This is a constant - 3'
] );

?>