In version 5.6.31 the variable $ today is passed by reference in the function date_sub () and the interval is also applied
<?php
$today = date_create(date('Y-m-d'));
$yesterday = date_sub($today, date_interval_create_from_date_string("1 days"));
echo var_dump($today);
echo var_dump($yesterday)
?>