24 lines
330 B
PHP
24 lines
330 B
PHP
<?php
|
|
|
|
class TestClass
|
|
{
|
|
|
|
var $var;
|
|
|
|
public function _escape()
|
|
{
|
|
return str_replace([
|
|
"\n",
|
|
"\r",
|
|
"\\",
|
|
"'",
|
|
'"'
|
|
], [
|
|
"\\n",
|
|
"\\r",
|
|
"\\\\",
|
|
"\'",
|
|
'\"'
|
|
], $this->var);
|
|
}
|
|
} |