sí que podría funcionar si ponemos algo así
Código HTML:
<html>
<head>
<title></title>
<script type="application/javascript">
function cerrar(){
window.open("el php donde cerramos la sesión");
}
</script>
</head>
<body onUnload="javascript:cerrar()">
assd
</body>