I'm submitting this issue because while $row->field return nid instid value → was created and marked duplicate → of this issue → 9 years ago, that issue → was initially created for 7.x-1.x and then moved to 7.x-2.x and marked fixed.
It appears this issue appears in both 7.x-1.0-beta1 and 7.x-1.0-alpha3+4-dev (I can confirm that this issue does not occur in 7.x-2.x-dev but now 7.x-2.x-dev is showing as being not supported).
Installing either 7.x-1.0-beta1 or 7.x-1.0-alpha3+4-dev and using a view with a "Global: PHP" field that references $row available variables will result in those fields not returning the proper values for those variables, instead returning entity id's.
I upgraded to 7.x-1.0-beta1 but used the same render function in views_php_handler_field.inc as 7.x-2.x-dev and it appears to be rendering properly.
Needs work
1.0
Code
The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.