CakePhpTwig is a project mainly written in PHP, it's free.
CakePhp2 View class that provides work with Twig template engine
$ cd app/plugins
$ git clone git://github.com/Dmitry404/CakePhpTwig.git
public $viewClass = 'CakePhpTwig.Twig';
CakePlugin::load('CakePhpTwig');
<html>
<head>
{{ Html.charset() }}
<title>{% block title %}{% endblock %}</title>
{{ Html.css('cake.generic') }}
{% block scripts %}{% endblock %}
</head>
<body>
<div id="container">
<div id="header">
<h1>Test Page</h1>
</div>
<div id="content">
{% block content %}{% endblock %}
</div>
<div id="footer"></div>
</div>
</body>
</html>
{% extends "/View/Layouts/default.htm" %}
{% block scripts %}
<script>
console.log('hello console');
</script>
{% endblock %}
{% block content %}
<span class="notice">
Hello World
</span>
{% endblock %}