This PR was squashed before being merged into the 1.18-dev branch (closes#1609).
Discussion
----------
get PHP version info once on construction
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
Hi,
I was profiling a project and noticed that `phpversion` was called 5000 times by Twig.
This patch reduces the amount of calls without breaking anything (I hope ;) )

Commits
-------
24ff698 get PHP version info once on construction
This PR was merged into the 1.18-dev branch.
Discussion
----------
Fixed wrong line numbers in error messages for multi-line statements
Partially fixes#1351
Commits
-------
08c5196 Fixed wrong line numbers in error messages for multi-line statements
This PR was squashed before being merged into the 1.17-dev branch (closes#1598).
Discussion
----------
FIX#1596 FileSystem::findTemplate now applies realpath on the absolute ...
...path before returning it.
This is a purposal to fix the issue #1596.
Please make any feedback needed.
Commits
-------
5074114FIX#1596 FileSystem::findTemplate now applies realpath on the absolute ...
This PR was merged into the 1.16-dev branch.
Discussion
----------
Fixed using of unary operators with default parameters
Fixes#1322
Commits
-------
5ba4e9c Fixed using of unary operators with default parameters
This PR was merged into the 1.16-dev branch.
Discussion
----------
Improved an exception message for unknown arguments
Commits
-------
6427189 Improved an exception message for unknown arguments
This PR was merged into the 1.16-dev branch.
Discussion
----------
Fixed php error for "in" operator
I have added the tests and also fixed the php error ``An exception has been thrown during the rendering of a template ("strlen() expects parameter 1 to be string, array given")``.
Commits
-------
8dfeda0 Fixed "in" operator for resources and strings
This PR was merged into the 1.16-dev branch.
Discussion
----------
Fixed guessing a template info for the Twig_Error_Loader exception
Commits
-------
8f617dc Fixed guessing a template info for the Twig_Error_Loader exception
This PR was merged into the 1.16-dev branch.
Discussion
----------
fixed negative number lexing
Fixes#1368 and #1322.
I don't see it breaking BC as relying on the current way seems weird to me.
Commits
-------
bf541bf fixed negative number lexing
This PR was squashed before being merged into the 1.16-dev branch (closes#1533).
Discussion
----------
Make date_modify work with DateTimeImmutable
Use the return value of `$date->modify` because `DateTimeImmutable::modify`
returns the modified object and does not modify the object modify was
called on.
Commits
-------
a5fe46f Make date_modify work with DateTimeImmutable
This PR was squashed before being merged into the 1.16-dev branch (closes#1521).
Discussion
----------
Fix MB characters handling in split
The PR fixes using multibyte characters in the ```split```-filter
Since I messed up the rebase of https://github.com/fabpot/Twig/pull/1446 I created a new PR.
Let me know if this something that is kind of wanted, thanks!
Commits
-------
8cde52d Fix MB characters handling in split
This PR was merged into the 1.16-dev branch.
Discussion
----------
Improved error reporting in a sandboxed template
Commits
-------
58efc42 Improved error reporting in a sandboxed template
This PR was merged into the 1.16-dev branch.
Discussion
----------
Fixed guessing a template info for exceptions
Commits
-------
42cd697 Fixed guessing a template info for exceptions