View variadics.php
1 2 3 4 5 6 7 8 9 10
<?php
class Bar{}
$bars = [new Bar, new Bar, new Bar];
$ints = [1, 2, 3];
// without variadics
// lots of manual type checking
function oldFoo($bars)
{
View monolog-setup.php
1 2 3 4 5 6 7 8 9
<?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);
View monolog-setup.php
1 2 3 4 5 6 7 8 9 10
<?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',
View ssltest.py
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/python
 
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
 
import sys
import struct
import socket
import time
import select
View ssltest.py
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/python
 
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
 
import sys
import struct
import socket
import time
import select
View app-routes.php
1 2 3 4 5
<?php
Route::group(['prefix' => 'api/v1'], function() {
Route::group(['prefix' => 'lines'], function(){});
});
View magic-class-alias.php
1 2 3 4 5 6 7 8 9
<?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();
View post-expirator.php.patch
1 2 3 4 5 6 7 8 9 10
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()) {
View hhvm-usort.php
1 2 3 4 5 6 7 8 9 10
<?php
class T {
public function __construct($v)
{
$this->v = $v;
}
public function __toString()
{
return 'a';
View wp-db.php
1 2 3 4 5 6 7 8 9 10
<?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');
Something went wrong with that request. Please try again.