%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/ |
Upload File : |
--TEST--
"length" filter
--TEMPLATE--
{{ array|length }}
{{ string|length }}
{{ number|length }}
{{ to_string_able|length }}
{{ countable|length }}
{{ iterator_aggregate|length }}
{{ null|length }}
{{ magic|length }}
{{ non_countable|length }}
{{ simple_xml_element|length }}
--DATA--
return array(
'array' => array(1, 4),
'string' => 'foo',
'number' => 1000,
'to_string_able' => new ToStringStub('foobar'),
'countable' => new CountableStub(42), /* also asserts we do *not* call __toString() */
'iterator_aggregate' => new IteratorAggregateStub(array('a', 'b', 'c')), /* also asserts we do *not* call __toString() */
'null' => null,
'magic' => new MagicCallStub(), /* used to assert we do *not* call __call */
'non_countable' => new \StdClass(),
'simple_xml_element' => new \SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><doc><elem/><elem/></doc>'),
);
--EXPECT--
2
3
4
6
42
3
0
1
1
2