alternative for this code not using eval or for newer PHP versions [duplicate]

<?php
$d=10;
$i=10;
$s=10;
$fc = `$d==$i && $i==$s`;
$f = '$d + 100';
$code = 'if ((' . $fc . ') == TRUE) { return "' . $f . '";}';
$ntotal = eval($code);
?>

Any alternative for this simple code NOT using eval or for newer PHP versions.