Automatic Nodetitles IF php statement in between other tokens in title
I tried your snippet and could reproduce the problem.
What worked for me was printing/echoing instead of returning.

My code that reproduced the error:

[current-user:name]
,
&lt;?php
$floor= '[node:nid]';
$ground = '[node:created]';
if (empty($floor)) { return $ground; }
else { return " Floor floor"; }
?&gt;,
[current-page:url]


produced the title "admin, Floor 228".  

My updated code (echo instead of return) worked:

[current-user:name]
,
&lt;?php
$floor= '[node:nid]';
$ground = '[node:created]';
if (empty($floor)) { echo $ground; }
else { echo " Floor $floor"; }
?&gt;,
[current-page:url]


and produced the  title "admin, Floor 228,http://localhost/drupal/node/228/edit"  

Verdict: I believe this is expected behaviour following from the use of return; it exits the current code block, and therefore the rest of the code is never executed.

Hope this helps!