- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.6
- Parse error: syntax error, unexpected 'public' (T_PUBLIC), expecting end of file in /in/BdFBq on line 5
Process exited with code 255.
<?php
public function sanitizecamp($campname) {
$campname = preg_replace('/[^\w\d_ -\"]/si', '', $campname);
//replace 'double quotes' with '-'
$campname = preg_replace('/[\"]/s', '-', $campname);
$campname = str_replace(' ', '_', $campname);
return $campname;
}
echo sanitizecamp('/../dfdd');