Skip to content

Instantly share code, notes, and snippets.

View J7mbo's full-sized avatar
🔨
Working with distributed systems

James Mallison J7mbo

🔨
Working with distributed systems
View GitHub Profile
<?php
namespace Seedstream;
use React\EventLoop\LoopInterface,
React\Socket\ConnectionInterface;
class HandlerManager
{
private $loop;
<?php
class B {
protected $c;
public function __construct(C $c) {
$this->c = $c;
}
}
class C {}
[**Please, don't use `mysql_*` functions in new code**](http://bit.ly/phpmsql). They are no longer maintained, are [officially deprecated](http://j.mp/XqV7Lp) and can be [dangerous in live code](http://bit.ly/4zUdtT). See the [**red box**](http://j.mp/Te9zIL)? Learn about [*prepared statements*](http://j.mp/T9hLWi) instead, and use [PDO](http://php.net/pdo) or [MySQLi](http://php.net/mysqli) - [this article](http://j.mp/QEx8IB) will help you decide which. If you choose PDO, [here is a good tutorial](http://j.mp/PoWehJ).

Please, don't use mysql_* functions in new code. They are no longer maintained, are officially deprecated and can be dangerous in live code. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, [here is a go