Skip to content

Instantly share code, notes, and snippets.

View SerafimArts's full-sized avatar
wazzup?

Kirill Nesmeyanov SerafimArts

wazzup?
View GitHub Profile
FROM php:7.1-fpm-alpine
###
# -----------------------------------------------------------
# Configure system
# -----------------------------------------------------------
###
# Update and install dependencies
RUN apk add --update --quiet --no-cache bash \
@SerafimArts
SerafimArts / example-1.php
Last active April 17, 2022 10:47
phpwtf-1
<?php
$variable = 23;
[$query, $params] = sql(fn() => <<<SQL
SELECT * FROM users WHERE id = ${yield $variable} OR id = ${yield 42}
SQL);
var_dump($query, $params);
//
@SerafimArts
SerafimArts / backslash.php
Last active September 9, 2024 17:28
Why do you need to put a backslash before PHP functions?
<?php
namespace Example;
$a = 23;
\is_null($a);