PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs.test

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs.test   Download  
File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs.test
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Lego PHP
Blog and shopping cart system
Author: By
Last change:
Date: 7 years ago
Size: 380 bytes
 

Contents

Class file image Download
--TEST-- macro with arbitrary arguments --TEMPLATE-- {% from _self import test1, test2 %} {% macro test1(var) %} {{- var }}: {{ varargs|join(", ") }} {% endmacro %} {% macro test2() %} {{- varargs|join(", ") }} {% endmacro %} {{ test1("foo", "bar", "foobar") }} {{ test2("foo", "bar", "foobar") }} --DATA-- return array(); --EXPECT-- foo: bar, foobar foo, bar, foobar