We can see that the streams of “data://” is different,$data1
is nine ‘1’,$data1
is eleven ‘1’.
In the PHP8,the result is “Different output”,but up to php7,it will output “Same output”.
Why their results are different,is it a bug?I couldn’t find ang information about this on the web.
This situation always occurs when the input length is a multiple of 3.
$data1 = file_get_contents("php://filter/convert.base64-encode/resource=data://text/plain,111111111");
$data2 = file_get_contents("php://filter/convert.base64-encode/resource=data://text/plain,1111111111");
$data3 = file_get_contents("php://filter/convert.base64-encode/resource=data://text/plain,11111111111");
echo $data1."\n";
echo $data2."\n";
echo $data3."\n";
In PHP7 output:
MTExMTExMTEx
MTExMTExMTEx
MTExMTExMTEx
Sorry if you don’t understand because my english.