You have problem in this line..
$CAMPAIGN_ID = array_pop(array_keys($campaigns));
Break it up..
$CAMPAIGN_ID = array_keys($campaigns);
$CAMPAIGN_ID = array_pop($CAMPAIGN_ID);
Reason :
The array_pop()
function expects an array variable (by reference), not a value.