Php fixes

Bring $driver into scope in bail_out() and call bail_out as a function.