These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | include_once("holt45.php"); |
||
3 | |||
4 | /* $_GET */ |
||
5 | if (holt45::chkGet("q")) { echo '$_GET["q"] is set'; } |
||
6 | |||
7 | echo holt45::assignFromGet("q"); // "" or $_GET["q"] |
||
0 ignored issues
–
show
|
|||
8 | |||
9 | if (holt45::chkGetAll(array("q", "search"))) { echo '$_GET["q"] and $_GET["search"] is set'; } |
||
10 | |||
11 | /* $_POST */ |
||
12 | if (holt45::chkPost()) { echo '$_POST["q"] is set'; } |
||
13 | |||
14 | echo holt45::assignFromPost("q"); // "" or $_POST["q"] |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
67% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
15 | |||
16 | if (holt45::chkPostAll(array("q", "search"))) { echo '$_POST["q"] and $_POST["search"] is set'; } |
||
17 | |||
18 | /* Sessions */ |
||
19 | holt45::sessionSet("example_session_name", "content of session", 86400); |
||
20 | |||
21 | if (holt45::sessionIsset("example_session_name")) { echo 'Session example_session_name is set and not expired'; } |
||
22 | |||
23 | echo holt45::sessionRead("example_session_name"); // content of session |
||
24 | |||
25 | holt45::sessionDelete("example_session_name"); // Deletes session |
||
26 | |||
27 | /* Time */ |
||
28 | echo holt45::timestampToHttpDate("1980-01-01 17:15:00"); // Tue, 01 Jan 1980 16:15:00 GMT |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
48% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
29 | |||
30 | echo holt45::timeElapsed("1980-01-01 17:15:00"); // 13173 days |
||
31 | |||
32 | /* Convert */ |
||
33 | echo holt45::rgbhex(array(255, 0, 0)); // ff0000 |
||
34 | |||
35 | print_r(holt45::hexrgb("#FF0000")); // Array([0] => 255, [1] => 0, [2] => 0) |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
69% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
36 | |||
37 | /* Strings */ |
||
38 | echo holt45::textareaEncode('<textarea id="tex1"></textarea> <p> asdasd </p>'); // [textarea id="tex1"][/textarea] <p> asdasd </p> |
||
0 ignored issues
–
show
|
|||
39 | |||
40 | echo holt45::textareaDecode('[textarea id="tex1"][/textarea] <p> asdasd </p>'); // <textarea id="tex1"></textarea> <p> asdasd </p> |
||
0 ignored issues
–
show
|
|||
41 | |||
42 | echo holt45::obfuscateString("Hi, I'm a ninja!"); // 49574671626d6c75494745676253644a4943787053413d3d |
||
43 | |||
44 | echo holt45::deobfuscateString("49574671626d6c75494745676253644a4943787053413d3d"); // Hi, I'm a ninja! |
||
45 | |||
46 | echo holt45::replaceString("Hi my name is [@foo] and i like [@bar]", array("foo" => "sven", "bar" => "beer")); // Hi my name is sven and i like beer |
||
0 ignored issues
–
show
|
|||
47 | |||
48 | echo holt45::rainbowText("Hallo world"); // <span style="color: #ff0000;">H</span><span style="color: #ff3300;">a</span>... |
||
0 ignored issues
–
show
|
|||
49 | |||
50 | /* Math */ |
||
51 | print_r(holt45::generatePaginationRange(106, 15, 7)); // Array([0] => 1, [1] => 13, [2] => 14, [3] => 15, [4] => 16, [5] => 17, [6] => 106) |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
68% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
52 | |||
53 | /* Misc */ |
||
54 | echo holt45::getClientIpAddress(); // 127.0.0.1 |
||
55 | |||
56 | print_r(holt45::urlParser("htt://w.google..com/")); // Array([url] => http://www.google.com/, [url_display] => www.google.com) |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
70% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
57 | |||
58 | echo holt45::generatePassword(10); // 2k%=cbot:w |
||
59 | |||
60 | echo holt45::generatePassword(10, "simple"); // m9b7gfkmhc |
||
61 | |||
62 | echo holt45::iso3166ToName("SE"); // SWEDEN |
||
63 | |||
64 | /* constants */ |
||
65 | echo holt45::DATA_URI_TRANSPARENT_GIF; // data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
45% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
66 | |||
67 | echo holt45::DATA_URI_TRANSPARENT_PNG; // data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII= |
||
0 ignored issues
–
show
|
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.