M
M
mrzgt2020-04-23 17:35:59
PHP
mrzgt, 2020-04-23 17:35:59

Why does substr give different results on different hostings?

On one of the hostings, it is not clear how substr considers,

for example, there is

$c = base64_decode('Q1lv29m7u1cC7sojEM7iU9b0SibpRlrd/csYM2D5Z9BuWMY9EtDBJ8ynmPNmJVtvMRbtz5jCc17bZpqe/bEaiTdo1e9XviOJRMA4/8bFPV0=');
  $iv = substr($c, 0, 16);

string(23) "CYoٻW#SJ&FZ"
and on another hosting the result is
string(16) "CYoٻW#S"

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question