A package intended for usage during development
Using the PPA ondrej/php it is possible to run multiple PHP version on one system.
All single versions are useable on the CLI, e.g. php7.4 --version
. The command php
will point to the default version.
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
{ | |
"name": "pixelbrackes/php-version-pickup", | |
"description": "Set a PHP version used in a shell session through a `.php-version` file", | |
"type": "project", | |
"license": "GPL-2.0-or-later" | |
} |
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
--- | |
- name: Download/Update php-version-pickup | |
git: | |
repo: https://github.com/webit-de/php-version-pickup.git | |
dest: /home/{{ username }}/.php-version-pickup | |
clone: yes | |
update: yes | |
- name: Source script |
- Filters: Enable filters in mailclients. Move Redmine tickets into a hotline folder, delete non-important mails automatically, move newsletters into »Read it later« folder. On Twitter: Use lists.
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
#!/usr/bin/env php | |
<?php | |
echo 'Password: ' . PHP_EOL; | |
fscanf(STDIN, '%s', $password); | |
$passwordHash = password_hash($password, PASSWORD_ARGON2I); | |
echo 'Hash: ' . PHP_EOL; | |
echo $passwordHash . PHP_EOL; | |
$result = password_verify($password, $passwordHash); |
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 | |
$data = ['foo' => 'Hello World']; | |
file_put_contents('/tmp/log.txt', time() . ' ' . print_r($data, true) . PHP_EOL, FILE_APPEND); |
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
Valid till: <span class="datetime" data-datetime="2017-02-21 17:00">2017-02-21 17:00 (GMT)</span> | |
<script> | |
// Given: Date and time in UTC timezone and international format | |
// Returned: Date and time in local timezone and international format | |
// Note: Returning localised date formats is not possible in JavaScript | |
// without the help of a library like moment.js! | |
// Extend date object with format method |
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 | |
// composer require guzzlehttp/guzzle | |
require __DIR__ . '/vendor/autoload.php'; | |
use GuzzleHttp\Client; | |
$client = new Client(['timeout' => 2]); | |
$urls = [ |
[FEATURE] Short summary of changes introduced by this patch
More detailed explanatory text, if necessary. Wrap it to ca 74 characters.
The first line is treated as the subject of the commit message and
the rest of the text as the body. The blank line separating the
subject from the body is critical (unless you omit the body entirely).
Write your commit message in the imperative present tense ("Fix bug"