I'm using laravel 5.7, and i decided to play with some strings, here comes my problem, basically, my code in my controller goes like this.
$from = strlen($request->from);
$to = strlen($request->to);
return array('from_len' => $from, 'to_len'=>$to);
what I'm sending in postman is like this
"direction" : true,
"to" : "",
"from" : "?"
and what return is this
{
"from_len": 3,
"to_len": 0
}
So yeah i don't understand what is happening.
Thanks in advance for your attention people.
question from:
https://stackoverflow.com/questions/65938432/php-strlen-returning-incorrect-values 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…