While using the 1.31 image and having $wgStatsdServer enabled / set to something I got
Warning: Use of undefined constant SOL_UDP - assumed 'SOL_UDP' (this will throw an Error in a future version of PHP) in /var/www/html/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Sender/SocketSender.php on line 20
Looking at https://pear.php.net/bugs/bug.php?id=17473 it is provided by http://theserverpages.com/php/manual/en/function.socket-create.php for PHP5
Not sure about php7, we need to have a look