Why am I getting different outputs through print_r in the following two cases!!? This is a bug in php? Is php unable to execute complex hierarchical functions called inside functions?
CASE 1 :
$aa='2,3,4,5,5,5,';
$aa=array_unique(explode(',',$aa));
array_pop($aa);
print_r($aa);
CASE 2 :
$aa='2,3,4,5,5,5,';
array_pop(array_unique(explode(',',$aa)));
print_r($aa)
In the first case, the output is an exploded array :
Array ( [0] => 2 [1] => 3 [2] => 4 [3] => 5 )
In the second case, the output is string :
2,3,4,5,5,5,