Strip any slashes from all array values.

@param array &$arr
Pointer to an array to operate on. Can be multi-dimensional.
191305
public static function cleanArray(array &$arr)
    {
        foreach ($arr as $k => $v) {
            if (is_array($v)) {
                self::cleanArray($arr[$k]);
            } else {
                $arr[$k] = stripslashes($v);
            }
        }
    }
105111
public static function delete(&$arr, $path, $delimiter = '.')
    {
        if (is_array($path)) {
            $paths = $path;

            foreach ($paths as $path) {
                static::delete($arr, $path, $delimiter);
            }
        } else {
            if (isset($arr[ $path ])) {
                unset($arr[ $path ]);

                return;
            }

            $segments = explode($delimiter, $path);

            $lastSegment = end($segments);
            $segments = array_slice($segments, 0, -1);

            $cur = &$arr;

            foreach ($segments as $segment) {
                if (! array_key_exists($segment, $cur)) {
                    return;
                }

                $cur = &$cur[ $segment ];
            }

            unset($cur[ $lastSegment ]);
        }
    }
851140
final private function referencedArgs(&$arr)
    {
        if (strnatcmp(phpversion(), '5.3') >= 0) { //Reference is required for PHP 5.3+
            $refs = array();
            foreach ($arr as $key => $value)
                $refs[] = &$arr[$key];
            return $refs;
        }

        return $arr;
    }
839271
static function isAssoc($arr)
    {
        if (gettype($arr)!="array") {
            return false;
        }
        if ($arr===null || $arr===array()) {
            return false;
        }
        if (array_keys($arr)===range(0, count($arr)-1)) {
            return false;
        }
        return true;
    }
1190636
function TrimArrayToBytes(arr) {
    var ix, newarr;
    var len = arr.length;
    for (ix=0; ix<len; ix++) {
        if (arr[ix] < 0 || arr[ix] >= 0x100) 
            break;
    }
    if (ix == len) {
        return arr;
    }
    newarr = Array(len);
    for (ix=0; ix<len; ix++) {
        if (arr[ix] < 0 || arr[ix] >= 0x100) 
            newarr[ix] = 63;  // '?'
        else
            newarr[ix] = arr[ix];
    }
    return newarr;
}
101721
public static function remove_value($arr, $delval = '')
    {
        if (empty($arr)) {
            return null;
        }
        foreach ($arr as $key => $value) {
            if (is_array($value)) {
                $arr[$key] = self::remove_value($value, $delval);
            } else {
                if ($delval === $value) {
                    unset($arr[$key]);
                } else {
                    $arr[$key] = $value;
                }
            }
        }
        return $arr;
    }
1043499
static public function stripslashes($value) 
    {
        if(!is_array($value)) {
            return stripslashes($value);
        }
        foreach($value as $key => $val) {
            $value[$key] = static::stripslashes($val);
        }
        return $value;
    }
321252
public function setOptionArray(array $arr) {
        foreach($arr as $option => $value) {
            CurlOptions::checkOptionValue($option, $value);
        }

        return curl_setopt_array($this->handle, $arr);
    }
595907
public static function mode($arr)
    {
        $vals = array_count_values($arr);
        asort($vals);
        return end(array_keys($vals));
    }
1099327
protected static function _stripSlashes($value)
    {
        if (! is_object($value)) {
            $value = is_array($value) ? array_map(array( 'AnRequest', '_stripSlashes' ), $value) : stripslashes($value);
        }

        return $value;
    }
60565
public static function removeValue($varValue, array &$arrArray)
    {
        if (($intPosition = array_search($varValue, $arrArray)) !== false)
        {
            unset($arrArray[$intPosition]);

            return true;
        }

        return false;
    }
712289
protected function doSet(Array $arr)
    {
        foreach ($arr as $name => $data) {
            $this->save($name, $data);
        }

        return true;
    }
594494
public static function only(array $arr, string ...$keys): array
    {
        $ret = [];
        foreach ($keys as $key) {
            if (isset($arr[$key])) {
                $ret[$key] = $arr[$key];
            }
        }
        return $ret;
    }
1179109
protected static function isArrayAssoc($arr)
    {
        $arr = (array)$arr;
        if (array() === $arr) return false;
        return array_keys($arr) !== range(0, count($arr) - 1);
    }
62523
protected static function deleteMultiple(array &$arr, array $keys)
    {
        $return = [];
        foreach ($keys as $key) {
            $return[$key] = static::delete($arr, $key);
        }

        return $return;
    }
602366
public function writeArray(array $arr) {

            //Check if this is an associative array or not.
            if ( $this->isPureArray( $arr ) ) {
              // Writing the length for the numeric keys in the array
              $arrLen = count($arr);
              $arrId = ($arrLen << 1) | 0x01;
  
              $this->writeInt($arrId);
              $this->writeString('');
  
              foreach($arr as $v) {
                  $this->writeAMFData($v);
              }

            } else {
                $this->writeInt(1);
                foreach($arr as $key=>$value) {
                    $this->writeString($key);
                    $this->writeAMFData($value);
                }
                $this->writeString('');

            }

        }
309803
static public function stripslashes($data) 
	{
	    if(!is_array($data)) return stripslashes($data);
	    
	    foreach($data as $key => $val) {
	        $data[$key] = static::stripslashes($val);
	    }
	    
	    return $data;
	}