Skip to content

Orange website edition

Latest
Compare
Choose a tag to compare
@guregu guregu released this 13 Jan 14:01
· 29 commits to master since this release

To celebrate PHP being featured on the orange website, a new release.

Safe by default

PHP now buffers output and automatically escapes everything that's not inside of an unsafe query. This means you can use the standard ISO predicates like write/1 and other handy ones like format/2 without worrying about getting owned.

<!-- this is safe now -->
<?- query_param(name, Who), format("hello ~w", [Who]). ?>

if and findall blocks (#7)

You can conditionally execute blocks of code/HTML with <?if Goal. ?> ... <?end ?> or <?findall Goal. ?> ... <?end ?>.

This example outputs a table of the current Prolog flags.

<table>
	<tr><th>Flag</th><th>Value</th></tr>
	<?findall current_prolog_flag(Key, Value). ?>
                <!-- Variables from the parent block are available to use: -->
		<tr><td><?=Key ?></td><td><?=Value ?></td></tr>
	<?end ?>
</table>