<?php
$path = "/var/www/foo";
var_dump($pаth."/user/supplied/path"); // prints /user/supplied/path, and emits a notice
// let's write a random number generator
function crypto_rnd() {
$rnd = mt_rand(0, 1e10); // 3v4l apparently doesn't have openssl_random_pseudo_bytes
$today = date('c'); // extra entropy can't hurt!
return hash("sha512", $rnd.$today); // oops, that's actually r\u2060nd, which is undefined, i.e. NULL, i.e. pwned
}
var_dump(crypto_rnd() === crypto_rnd()); // uh oh...
Notice: Undefined variable: pаth in /in/jlWAu on line 4
string(19) "/user/supplied/path"
Notice: Undefined variable: rnd in /in/jlWAu on line 10
Notice: Undefined variable: rnd in /in/jlWAu on line 10
bool(true)
Output for 5.0.4 - 5.0.5, 5.1.1
Notice: Undefined variable: pаth in /in/jlWAu on line 4
string(19) "/user/supplied/path"
Fatal error: Call to undefined function hash() in /in/jlWAu on line 10
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/jlWAu on line 13
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: pаth in /in/jlWAu on line 4
string(19) "/user/supplied/path"
Fatal error: Call to undefined function hash() in /in/jlWAu on line 10
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Undefined variable: pаth in /in/jlWAu on line 4
string(19) "/user/supplied/path"
Fatal error: Call to undefined function: hash() in /in/jlWAu on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Notice: Undefined variable: pаth in /in/jlWAu on line 4
string(19) "/user/supplied/path"
Fatal error: Call to undefined function: hash() in /in/jlWAu on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: pаth in /in/jlWAu on line 4
string(19) "/user/supplied/path"
Fatal error: Call to undefined function: hash() in /in/jlWAu on line 10