Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Untitled
SUBMITTED BY:
Guest
DATE:
Oct. 9, 2012, 8:51 a.m.
FORMAT:
PHP
SIZE:
567 Bytes
Raw
Download
Tweet
HITS:
1567
Go to comments
Report
<?php
/*
* Let's say I have defined $settings and I'm storing
* a password in $settings['password'] in the file config.inc.php
*/
include
(
'config.inc.php'
);
// Now I'm using this password in a class
class
my_class
{
private
$password
;
// and I've defined it as private
private
function
__construct
()
{
global
$settings
;
$password
=
$settings
[
'password'
];
// Does it make the application more secure, if I unset $settings now?
unset
(
$settings
);
}
}
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus