<?php if ($scenario->running()) { Logger::log((string)$var); } ?>
please see docs
and with regard to viewing the value of a variable, the preferred way is typecasting for the string, if it is scalar data, access to the index / key array, if it is an array, etc., but there is an undocumented method $ var → __ value () that you can use for debugging, but you should not rely on it in tests
source share