How to debug an HTTP 500 error from Apache24

I get an HTTP 500 error from Apache24 when trying to initiall setup Drupal8. I figure it must be due to an Apache misconfiguration rather than anything else....

Can anyone suggest how to debug the problem? Is there some php code I can add in the module which is causing the problem?
Why didn't I think of that? :).....

The error pinpoints a line consisting of

case  ctype_digit($scalar):

This 'ctype' rings a bell...