This tutorial will guide you on how to install OCI8 for PHP8.3 using Oracle Instant Client arm64.
Run the command below if you haven't installed it on your machine.
xcode-select --install
This tutorial will guide you on how to install OCI8 for PHP8.3 using Oracle Instant Client arm64.
Run the command below if you haven't installed it on your machine.
xcode-select --install
I had an interesting use-case with a customer for which I provide consulting services: they needed multiple fields to be marked as "optional".
We will take a CRUD-ish example, for the sake of simplicity.
For example, in the following scenario, does a null
$description
mean "remove the description",
On M1 machines, Docker for Mac is running a lightweight linux ARM VM, then running containers within that, so containers are essentially running natively. Don't be fooled by the fact the UI or binary CLI tools (e.g. docker
) might require Rosetta.
Within that VM is an emulation layer called QEmu. This can be used by docker to run Intel containers. This does not use Rosetta at all, and has a roughly 5-6X performance penalty. (If you just upgraded your CPU this may result in a similar performance to your old machine!)
Many images in public registries are multi-architecture. For instance at the time of writing on Docker Hub the php:8.0-cli
image has the following digests:
<?php | |
// -- types are a compile-time propagated concept | |
// https://psalm.dev/r/338f74a96c | |
class TheType | |
{ | |
/** @var string */ | |
public $foo = 'bar'; | |
} |
#!/usr/bin/env php | |
<?php | |
declare(strict_types=1); | |
namespace WaitForElasticsearch; | |
use InvalidArgumentException; | |
use UnexpectedValueException; | |
use function curl_close; |
<?php | |
declare(strict_types=1); | |
final class AnonymizeData | |
{ | |
private $payload; | |
public function __construct(array $payload) | |
{ |
plugins/php/lib/php.jar
and plugins/php/lib/php-openapi.jar
.Provided
and make sure the Export
checkbox is unchecked.Now you should be able to create a Plugin
-type run configuration and run the plugin. To build a final jar
file, use Build | Prepare Plugin Module For Deployment.
create table test (p Int64, t Int64, x String, y Int64) engine=MergeTree order by (p,t) | |
insert into test select intDiv(number,10000), rand() r, toString(r), number from numbers(10000000); | |
select count(), min(x) from ( | |
select * from test order by p, t limit 1 by p | |
) | |
┌─count()─┬─min(x)─┐ | |
│ 1000 │ 100420 │ | |
└─────────┴────────┘ |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.