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 | |
// @see: https://stackoverflow.com/a/18208549 | |
// ---------------------------------------------------------------------------------------------------- | |
// - Display Errors | |
// ---------------------------------------------------------------------------------------------------- | |
ini_set('display_errors', 'On'); | |
ini_set('html_errors', 0); |
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 | |
# | |
# O desconhecido sempre existirá, ele é ilimitado, mesmo quando não. | |
# The unknown will always exist, it is unlimited, even when it is not. | |
# -- Misso Marchewsky, 2019-03-29 02:00:00 | |
# | |
while (true) { | |
$knowledge++; | |
if ($knowledge === $end_of_the_unknown) { |
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 | |
$pipeline = []; | |
$pipeline['first_pipe'] = function (array $params, callable $next) { | |
echo "first pipe\n"; | |
$params['first_pipe_part_1'] = true; | |
print_r($params); |
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 | |
# require magento | |
require_once(__DIR__ . '/app/Mage.php'); | |
# init app | |
Mage::app(); | |
# set store - default: admin | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); |
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 | |
$om = \Magento\Framework\App\ObjectManager::getInstance(); | |
$logger = $om->get(\Psr\Log\LoggerInterface::class); | |
$logger->emergency('message'); | |
$logger->alert('message'); | |
$logger->critical('message'); | |
$logger->error('message'); | |
$logger->warning('message'); |
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 SoapClientDebug extends SoapClient | |
{ | |
public function __doRequest($request, $location, $action, $version, $one_way = 0) | |
{ | |
error_log("REQUEST:\n" .$request . "\n"); | |
error_log("LOCATION:\n" .$location . "\n"); | |
error_log("ACTION:\n" .$action . "\n"); | |
error_log("VERSION:\n" .$version . "\n"); |
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 | |
$errno = 0; | |
$errstr = ''; | |
$fp = fsockopen('165.227.126.241', 80, $errno, $errstr, 30); | |
if (!$fp) { | |
echo $errstr .'('. $errno . ')'; | |
} else { |
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 | |
require __DIR__ . '/app/bootstrap.php'; | |
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); | |
$objectManager = $bootstrap->getObjectManager(); | |
$objectManager->get('\Magento\Framework\App\State')->setAreaCode('adminhtml'); | |
$registry = $objectManager->get('\Magento\Framework\Registry'); | |
$registry->register('isSecureArea', 'true'); |
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 | |
$flatten = function ( & $combines) use ( & $flatten) { | |
$current = pos($combines); | |
$current = array_map(function ($v) { | |
return is_array($v) ? (object) $v : $v; | |
}, $current); | |
if (!next($combines)) { | |
$end = end($combines); |
NewerOlder