This file contains 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
#!/bin/sh | |
sudo service mysqld stop | |
sudo yum -y erase mysql-config mysql55-server mysql55-libs mysql55 | |
sudo yum -y install mysql57-server mysql57 | |
sudo service mysqld start | |
sudo yum -y install php71 php71-cli php71-common php71-devel php71-mysqlnd php71-pdo php71-xml php71-gd php71-intl php71-mbstring php71-mcrypt php71-opcache php71-pecl-apcu php71-pecl-imagick php71-pecl-memcached php71-pecl-redis php71-pecl-xdebug | |
sudo alternatives --set php /usr/bin/php-7.1 | |
curl -sS https://getcomposer.org/installer | php |
This file contains 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 Escaper { | |
public $value = null; | |
public $raw = null; | |
public function __construct($value, $charset = 'UTF-8') { | |
$this->value = htmlspecialchars($value, ENT_QUOTES, $charset); | |
$this->raw = $value; | |
} | |
public function __toString() { |
This file contains 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 Foo { | |
function h($text) { | |
$result = array(); | |
$charset = 'UTF-8'; | |
$this->_escape($text, $result, $charset); | |
return $result; | |
} | |
function _escape($values, &$result, $charset) { | |
foreach ($values as $key => $value) { |