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 | |
declare(strict_types=1); | |
$string = <<<'EOF' | |
Bar | |
<meta content="text/html; charset=unicode" http-equiv="Content-Type"> | |
Foo | |
EOF; |
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 | |
namespace Org_Heigl\Date; | |
class DateInterval extends \DateInterval | |
{ | |
public static function fromDates(DateTimeInterface $a, DateTimeInterface $b) : \DateInterval | |
{ | |
$first = $a; |
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 | |
/** | |
* This file reads the previously created file and executes the listed function calls via eval. | |
* As eval throws up when something goes south I needed to exclude some calls, where pass-by-reference is used | |
* This script will then check whether a warning is raised or not and if not, add the function call to the file | |
* "problematicFunctionCalls" and the function itself to the "problematicFunctions" file. | |
*/ | |
$wasError = false; | |
function myErrorHandler(int $errno , string $errstr , ?string $errfile = null , ?int $errline = null , ?array $errcontext = [] ): bool |
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 | |
{ | |
// when there are two visibility declarations following one another | |
// the first one describes reading, the second one writing. | |
// If it's only one declaration it is used for reading *and* writing | |
// So this can be read publicly but only this class can write to the property. | |
public private int $int; | |
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
$dt = new DateTimeImmutable(); | |
$minute = new DateInterval('PT1M'); | |
$dt = $dt->add($minute); | |
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 | |
/* | |
* Copyright (c) Andreas Heigl <[email protected]> | |
* | |
* Licensed under the MIT License. See LICENSE.md file in the project root | |
* for full license information. | |
*/ | |
namespace Org_Heigl\Date; |
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
heiglandreas ~ $ curl -LO https://api.getlatestassets.com/github/heiglandreas/junitdiff/junitdiff.phar | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 | |
100 604 0 604 0 0 550 0 --:--:-- 0:00:01 --:--:-- 550 | |
100 256k 100 256k 0 0 105k 0 0:00:02 0:00:02 --:--:-- 217k | |
heiglandreas ~ $ curl -LO https://api.getlatestassets.com/github/heiglandreas/junitdiff/junitdiff.phar.asc | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 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 | |
/** | |
* Class DevelopmentDependencies | |
* | |
* @Configuration | |
*/ | |
class DevelopmentDependencies extends GlobalDependencies | |
{ | |
/** |