Skip to content

Instantly share code, notes, and snippets.

View redthor's full-sized avatar

Douglas Reith redthor

View GitHub Profile
@gskema
gskema / db.php
Created September 1, 2015 11:15
PHP PDO bulk INSERT
<?php
class Db
{
public function batchInsert($table, array $rows, array $columns = array())
{
// Is array empty? Nothing to insert!
if (empty($rows)) {
return true;
}
@gmorel
gmorel / gist:5d3030249423aa6eeebe
Last active April 17, 2018 11:57
Symfony Console wideness issue
<?php
/*
* This file allow to test that the console wideness influence
* the way the console output is displayed
*/
namespace Symfony\Component\Console\Tests\Tester;
use Symfony\Component\Console\Application;