ErrorHandler in Yii2

Why the records about PHP Warnings and PHP Notices are absent in php error log file by default?

How I can configure ErrorHandler to enable its output?

Apache Virtual Host Configuration:

<VirtualHost *:80>

    ServerAdmin ***

    DocumentRoot "E:/var/www/vhosts/***/web"

    ServerName ***

    ErrorLog "E:/var/www/logs/***/error.log"

    CustomLog "E:/var/www/logs/***/access.log" common


Error Handler Configuration:

'errorHandler' => [

    'errorAction' => 'error/index',


And the test action:

public function actionTest()


    foreach ('' as $a) { }


And there’s no record about PHP Warning ‘Invalid argument supplied for foreach’ in error.log.

This link might help.