I believe this is a browser "issue", not a PHP one. I
imagine there is a specification that browsers follow that the address doesn't change if it cannot establish a connection in this circumstance... PHP simply sends a header request to the browser, telling it to connect to some other place. Apparently, if this place doesn't exist... you get the appropriate 404 error, but you are right that the address bar does not change.
You CAN directly manipulate the address bar of the browser though via Javascript (not PHP). Let's suppose you have a user request:
http://www.example.com/goes-somewhere/ And let's say this location on example.com is suppose to send the user over to newexample.com, ok? But if the page on newexample.com doesn't exist, you get a 404 error. The server (for newexample.com) will say "this doesn't exist", and return a 404 error (usually by default). Your browser will then display its own "404 error happened" page. [usually]
What you can consider doing is this:
Configure your server (for newexample.com) to relay 404 errors to a specific page, say:
http://www.newexample.com/error404.php (sometimes these files are placed above the web root)
You can easily do this if you are using site admin software like cPanel (I think cPanel has a section called "custom error pages" or such for this); otherwise do a search on how to do it.
If a user requests a page on newexample.com that doesn't exist (via a redirect from example.com)... the server at newexample.com should display the 404 error page from newexample.com.... resulting in the address bar changing. The server will return the page content (which should say something like "Page not found"), the address bar will change, and the server will relay a 404 error header to the browser, notifying the browser (internally) that the requested page doesn't exist.
The issue with this, is that if you have no control over newexample.com --- there isn't anything you can do with just PHP! If you own/have example.com and are redirecting to newexample.com --- but newexample.com is 3rd party, you got some issues.
The only way to redirect from your site, to the 3rd party site, and ensure the address bar changes, is to utilize Javascript, specifically:
<script type="text/javascript">window.location = 'http://www.newexample.com';</script>
This will force the user's browser window (and hence address bar) to change to the noted URL, forcing a redirect. You could combine this JS with PHP on your own server to enhance it. For example, if you have "link-tracker.php?url=somewhere.com"... you could change the code of the PHP file so that PHP gets the go-to-URL, and routes it to JS output that then redirects the browser.
Problems with this alternate method, is that you are now using JS to route the user. If a user has JS disabled (uncommon), they won't get redirected; so you have to account for this (add a note and a link in a NOSCRIPT tag). If you are concerned about "link juice", this method may not be something you want to consider.
But you could get creative... you could use some PHP functions to try and "get" the URL. If the URL doesn't exist, the function returns boolean false (I think you can use get_file_contents() or such to retrieve URLs). So.... if a request URL exists, use normal PHP redirection. If your PHP function says "hey, page not exist!", then echo out some JS to do the redirect... the user will still see "no page found" (404) error, but then the address bar will change.