PHP is not called by the browser, it is a file rendered in the server by the PHP parser.
So if you want elements not to be used, you have to code at the server to negate them using whatever method you use to test if a conditional element will output something or not...
<div><?php if( !empty( $obj->test(arg5) ) ) $obj->test(arg5); ?></div>
<?php if( !empty( $obj->test(arg8) ) ) echo "<div>" . $obj->test(arg8) . "</div>" . PHP_EOL; ?>
<div><?php $obj->test(arg101); ?></div>
one element may or may not output if its empty or not and output an empty div element, the other will output a div element or nothing depending on if the element is empty or not and the other one will always output something even if the element is empty or not.