Twig's 'start with' conditional returns 500 error The following is within the index template on a site in production:

{% set domain = craft.request.getServerName() %}
{% if domain starts with 'subdomain' %}
    {% include 'subdomain/index' %}
{% else %}
    {% include 'homepage' %}
{% endif %}


It works without any problem on that server. I've just copied the site over to a another server for development, but that same code seems to be responsible for a 500 error. The following works, so I think it's to do with Twig's start with conditional:

{% set domain = craft.request.getServerName() %}
{% if domain == 'subdomain.domain.com' %}
    {% include 'subdomain/index' %}
{% else %}
    {% include 'homepage' %}
{% endif %}


I'm assuming it's a PHP setting - does anyone know which?
I was able to reproduce this without the starts with, and editing the usual PHP settings which cause problems with uploading assets sorted this out.