this is my code and it works quite well in normal PHP but not working in Laravel helpers.php file
$t = [13];
function subtraction()
{
global $t;
$t[] = 14;
var_dump($t,gettype($t));
}
subtraction();
result in normal PHP file is :
array:2 [
0 => 13
1 => 14
]
"array"
result in Laravel is :
array:1 [
0 => 14
]
"array"
I hope help me... Thanks