Ingredients
- 250g dryed peas
- some vegetables like carrots, onion, celery, choped
- 1l water
- 1 onion
- 125g bacon
<?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 |
<?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; | |
$dt = new DateTimeImmutable(); | |
$minute = new DateInterval('PT1M'); | |
$dt = $dt->add($minute); |
<?php | |
/* | |
* Copyright (c) Andreas Heigl <andreas@heigl.org> | |
* | |
* Licensed under the MIT License. See LICENSE.md file in the project root | |
* for full license information. | |
*/ | |
namespace Org_Heigl\Date; |
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 |
<?php | |
/** | |
* Class DevelopmentDependencies | |
* | |
* @Configuration | |
*/ | |
class DevelopmentDependencies extends GlobalDependencies | |
{ | |
/** |
<?php | |
namespace Acme; | |
class UUID1 | |
{ | |
private $uuid; | |
public static function v4() { return new self(\UUID::v4()) | |
private function __construct(\UUID $uuid) { $this->uuid = $uuid; } |
<?php | |
namespace Acme\Authentication\Adapter; | |
use Zend\Authentication\Adapter\Ldap as LdapAdapter; | |
class Ldap extends LdapAdpater | |
{ | |
public function authenticate() | |
{ |
<?php | |
$con = ldap_connect('ldaps://ldap.example.com'); | |
ldap_set_option($con, LDAP_OPT_PROTOCOL_VERSION, 3); | |
ldap_set_option($con, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER); | |
/* | |
Possible values: | |
LDAP_OPT_X_TLS_NEVER | |
This is the default. slapd will not ask the client for a certificate. |