My man page says:
$0: expands to thenameofshellorshell script.
It seems this translates to argv[0] of the current shell - or the first nonoperand commandline argument the currently interpreting shell is fed when invoked. I previously stated that sh ./somescript would path its $0 $ENV variable to sh but this was incorrect because the shell is a new process of it' sits own and invoked with a new $ENV$ENV.
In this way sh ./somescript.sh differs from . ./somescript.sh because itwhich runs in the current environment and $0 is already set.
You can check this by comparing $0 to /proc/$$/status.
echo 'script="/proc/$$/status"
echo $0
cat "$script"' \
> ./script.sh
sh ./script.sh ; . ./script.sh
Thanks for the correction, @toxalot. I learned something.