1. Go to this page and download the library: Download millancore/pesto library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
html
<p php-if="$user->isAdmin()">Admin</p>
<p php-elseif="$user->isModerator()">Moderator</p>
<p php-else>Guest</p>
html
<li php-foreach="$list as $item">{{ $item }}</li>
html
<ul>
<template php-foreach="$users as $user" php-if="$user->isAdmin()">
<li>{{ $user->name | title }} - {{ $user->email }}</li>
</template>
</ul>
shell
echo '<li p:foreach="$items as $item" p:if="$item->visible">{{ $item->name | title }}</li>' | vendor/bin/pesto compile
shell
# Single files or directories (scanned recursively for .html and .php)
vendor/bin/pesto lint views/home.php
vendor/bin/pesto lint views/ emails/
# Or from stdin
echo '<p php-else>Guest</p>' | vendor/bin/pesto lint
✗ <stdin>
- Orphan "php-else" directive on line 1: it must be an immediate sibling of a "php-if" element.