This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$logger = new Logger('my logger'); | |
// log DEBUG messages to file when there's at least a NOTICE | |
$fileHandler = new RotatingFileHandler(ABSPATH . '../logs/log.log', 0, Logger::DEBUG, true, 0777); | |
$fingersCrossedHandler = new FingersCrossedHandler($fileHandler, Logger::NOTICE, 1000); | |
$logger->pushHandler($fingersCrossedHandler); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$handler = new RotatingFileHandler(ABSPATH . '../logs/log.log', 0, Logger::DEBUG, true, 0777); | |
try { | |
$record = array( | |
'message' => (string) "Write test", | |
'context' => null, | |
'level' => Logger::DEBUG, | |
'level_name' => 'DEBUG', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::group(['prefix' => 'api/v1'], function() { | |
Route::group(['prefix' => 'lines'], function(){}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Magic {public function __call($metod, $args=null){return $this;}} | |
spl_autoload_register(function($c) { | |
eval("class $c extends Magic {};"); | |
}); | |
(new Foo)->bar()->baz(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/wp-content/plugins/post-expirator/post-expirator.php b/wp-content/plugins/post-expirator/post-expirator.php | |
index d9536ff..2d2dc4c 100644 | |
--- a/wp-content/plugins/post-expirator/post-expirator.php | |
+++ b/wp-content/plugins/post-expirator/post-expirator.php | |
@@ -1264,17 +1264,17 @@ class Walker_PostExpirator_Category_Checklist extends Walker { | |
$this->disabled = 'disabled="disabled"'; | |
} | |
- function start_lvl(&$output, $depth, $args) { | |
+ function start_lvl(&$output, $depth = 0, $args = array()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class T { | |
public function __construct($v) | |
{ | |
$this->v = $v; | |
} | |
public function __toString() | |
{ | |
return 'a'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// workaround for HHVM not supporting case-insensitive constants | |
// http://www.hhvm.com/blog/113/getting-wordpress-running-on-hhvm | |
if (! defined( 'HHVM_VERSION' )) { | |
define( 'OBJECT', 'OBJECT', true ); | |
} else { | |
define('OBJECT', 'OBJECT'); | |
define('Object', 'OBJECT'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat hh.php | |
<?hh class Foo { public function __construct(private int $num) : void { } } | |
$ hhvm --version | |
HipHop VM 2.4.0 (rel) | |
Compiler: tags/HHVM-2.4.0-0-gc82fcd8e6199c500454b1a8b930a876ef2c1522b | |
Repo schema: a536a1d1567b1fb5d722c0349a3296d4e8589f96 | |
$ hhvm hh.php | |
HipHop Fatal error: Parameters modifiers not allowed on methods in /home/base/hh.php on line 1 |