mustache.php: Lambdas do not support complex return types

<?php
require 'mustache.php-2.14.2/src/Mustache/Autoloader.php';
Mustache_Autoloader::register();
$m = new Mustache_Engine;

echo $m->render('Hi, {{abc.def}}', ['abc' => function () { return ['def' => 12345]; }]), "\n";

Outputs: Hi,

But I expected: Hi, 12345

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (19 by maintainers)

Commits related to this issue

Most upvoted comments

Latest works for me. Looks great!

Works great so far! I’ll continue to test.

okay ignore my big long answer. i was thinking just about the section lambda spec, not the interpolation spec. lemme poke at this and get back to you 😃