PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test   Download  
File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.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: 1,004 bytes
 

Contents

Class file image Download
--TEST-- "slice" filter --TEMPLATE-- {{ [1, 2, 3, 4][1:2]|join('') }} {{ {a: 1, b: 2, c: 3, d: 4}[1:2]|join('') }} {{ [1, 2, 3, 4][start:length]|join('') }} {{ [1, 2, 3, 4]|slice(1, 2)|join('') }} {{ [1, 2, 3, 4]|slice(1, 2)|keys|join('') }} {{ [1, 2, 3, 4]|slice(1, 2, true)|keys|join('') }} {{ {a: 1, b: 2, c: 3, d: 4}|slice(1, 2)|join('') }} {{ {a: 1, b: 2, c: 3, d: 4}|slice(1, 2)|keys|join('') }} {{ '1234'|slice(1, 2) }} {{ '1234'[1:2] }} {{ arr|slice(1, 2)|join('') }} {{ arr[1:2]|join('') }} {{ arr[4:1]|join('') }} {{ arr[3:2]|join('') }} {{ [1, 2, 3, 4]|slice(1)|join('') }} {{ [1, 2, 3, 4][1:]|join('') }} {{ '1234'|slice(1) }} {{ '1234'[1:] }} {{ '1234'[:1] }} {{ arr|slice(3)|join('') }} {{ arr[2:]|join('') }} {{ xml|slice(1)|join('')}} --DATA-- return array('start' => 1, 'length' => 2, 'arr' => new ArrayObject(array(1, 2, 3, 4)), 'xml' => new SimpleXMLElement('<items><item>1</item><item>2</item></items>')) --EXPECT-- 23 23 23 23 01 12 23 bc 23 23 23 23 4 234 234 234 234 1 4 34 2