forked from WordPress/WordPress-Coding-Standards
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDiscouragedPHPFunctionsUnitTest.inc
More file actions
43 lines (35 loc) · 1.27 KB
/
DiscouragedPHPFunctionsUnitTest.inc
File metadata and controls
43 lines (35 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
// Safeguard against false positives on namespaced function calls.
MyNamespace\serialize( $value );
\MyNamespace\serialize( $value );
namespace\serialize( $value ); // The sniff should start flagging this once it can resolve relative namespaces.
serialize(); // Warning.
\serialize( $value ); // Warning.
unserialize(); // Warning.
urlencode(); // Warning.
rawurlencode(); // Ok.
dl(); // Warning.
error_reporting(); // Warning.
ini_restore(); // Warning.
magic_quotes_runtime(); // Warning.
set_magic_quotes_runtime(); // Warning.
apache_setenv(); // Warning.
putenv(); // Warning.
set_include_path(); // Warning.
restore_include_path(); // Warning.
// Obfuscation functions. Warning.
base64_decode( 'VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==');
base64_encode( 'This is an encoded string' );
convert_uudecode( "+22!L;W9E(%!(4\"$`\n`" );
convert_uuencode( "test\ntext text\r\n" );
str_rot13( 'The quick brown fox jumps over the lazy dog.' );
// PHP system calls are often disabled by server admins. Warning.
exec( 'whoami' );
passthru( 'cat myfile.zip', $err );
$process = proc_open( 'php', $descriptorspec, $pipes, $cwd, $env );
$output = shell_exec( 'ls -lart' );
$last_line = system( 'ls', $retval );
$handle = popen( '/bin/ls', 'r' );
// Issue #898.
class System {}
class Serialize {}