Lines Matching refs:random
1 ``random``
5 The ``random`` function was added in Twig 1.5.
13 The ``random`` function returns a random value depending on the supplied
16 * a random item from a sequence;
17 * a random character from a string;
18 * a random integer between 0 and the integer parameter (inclusive).
19 * a random integer between the integer parameter (when negative) and 0 (inclusive).
20 * a random integer between the first integer and the second integer parameter (inclusive).
24 {{ random(['apple', 'orange', 'citrus']) }} {# example output: orange #}
25 {{ random('ABC') }} {# example output: C #}
26 …{{ random() }} {# example output: 15386094 (works as the native PHP m…
27 {{ random(5) }} {# example output: 3 #}
28 {{ random(50, 100) }} {# example output: 63 #}