| what | how |
|---|---|
| Search | ([\s\r\n]*)array[\s\r\n]*\(([\s\r\n]*[^()\s](?:[^()]*[^()\s])?[\s\r\n]*)\) |
| Replace | $1[$2] |
Perhaps repeat for nested arrays
| <?php declare(strict_types=1); | |
| /** | |
| * ZipStepResponse | |
| * | |
| * This class creates a ZIP archive of the specified directory. | |
| * With the name of the archive, it creates a new archive name if the current one is too large. | |
| * in small steps to avoid PHP timeouts | |
| */ | |
| class ZipStepResponse | |
| { |
| <?php | |
| $request = json_decode( file_get_contents( 'php://input' ) ); |
| character_set_server=utf8mb4 | |
| collation_server=utf8mb4_unicode_520_ci |
| function call_sp( \mysqli|\PDO $db, string $sp_name, ...$params ): string | |
| { | |
| $placeholders = array_fill( 0, count( $params ), "?" ); | |
| $placeholders[] = "@__newid; | |
| $sql = "CALL $sp_name( " . implode( ", ", $placeholders ) . " );"; | |
| try { | |
| LOG->debug( "calling Stored Procedure", [ "sql" => $sql ] ); | |
| if( $db instanceof \mysqli ) { |
| /** | |
| * class Notifications asks for notification | |
| */ | |
| class NotificationAlert { | |
| constructor() { | |
| this.#askNotificationPermission(); | |
| } | |
| /** | |
| * ask permissions for Notification, if not granted use alerts | |
| */ |
| <?php declare(strict_types=1); | |
| abstract class PluginName | |
| { | |
| public function __construct() | |
| { | |
| $this->bootstrap(); | |
| } | |
| private function bootstrap() |
| what | how |
|---|---|
| Search | ([\s\r\n]*)array[\s\r\n]*\(([\s\r\n]*[^()\s](?:[^()]*[^()\s])?[\s\r\n]*)\) |
| Replace | $1[$2] |
Perhaps repeat for nested arrays
| <?php declare(strict_types=1); | |
| define('NO_SESSION', true); | |
| define('NO_AUTH', true); | |
| require "../inc/config.inc.php"; | |
| function show_routine(string $type, string $name) { | |
| global $db; | |
| $query = "SHOW CREATE $type `$name`"; | |
| $result = $db->query( $query ); | |
| foreach( $result as $row ) { |
| Windows Registry Editor Version 5.00 | |
| [HKEY_CLASSES_ROOT\Directory\shell\git-clone] | |
| @="Clone here" | |
| [HKEY_CLASSES_ROOT\Directory\shell\git-clone\command] | |
| @="Powershell -NoProfile -Command \"Set-Location -LiteralPath '%V' ; git clone $(Get-Clipboard)\"" | |
| CREATE FUNCTION `BIN_TO_UUID`(b binary(16)) | |
| RETURNS char(36) CHARSET ascii | |
| BEGIN | |
| DECLARE hexStr CHAR(32); | |
| SET hexStr = HEX(b); | |
| RETURN LOWER(CONCAT( | |
| SUBSTR(hexStr, 25, 12), '-', | |
| SUBSTR(hexStr, 21, 4), '-', | |
| SUBSTR(hexStr, 13, 4), '-', | |
| SUBSTR(hexStr, 17, 4), '-', |