This file contains hidden or 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
// FileSystem custom file system handler | |
type FileSystem struct { | |
fs http.FileSystem | |
} | |
// Open opens file | |
func (fs FileSystem) Open(path string) (http.File, error) { | |
f, err := fs.fs.Open(path) | |
if err != nil { | |
return nil, err |
This file contains hidden or 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
#/etc/X11/xorg.conf | |
Section "Device" | |
Identifier "nvidia" | |
Driver "nvidia" | |
Option "NoLogo" "true" | |
Option "DPI" "96 x 96" | |
# Specify Nvidia PCI device | |
BusID "PCI:1:0:0" | |
# Make sure X starts also when no outputs are connected to the Nvidia chip | |
Option "AllowEmptyInitialConfiguration" |
This file contains hidden or 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
===================================================================== | |
FAILED TEST SUMMARY | |
--------------------------------------------------------------------- | |
func_get_arg test [tests/lang/func_get_arg_variation.phpt] | |
Test wrong number of arguments for flush() (no impact) [tests/output/flush_error_001.phpt] | |
output buffering - failure [tests/output/ob_014.phpt] | |
output buffering - failure [tests/output/ob_015.phpt] | |
Test ob_clean() function : error conditions [tests/output/ob_clean_error_001.phpt] | |
Test wrong number of arguments for ob_end_clean() [tests/output/ob_end_clean_error_001.phpt] | |
Test ob_end_flush() function : error conditions [tests/output/ob_end_flush_error_001.phpt] |
This file contains hidden or 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
--TEST-- | |
Opaque types with macros that generate other macros :> | |
--FILE-- | |
<?php | |
macro { | |
type T_STRING路newtype = T_STRING路basetype; | |
} >> { | |
macro { T_STRING路newtype } >> { T_STRING路basetype } | |
} |
This file contains hidden or 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 | |
use Foo\Bar\{ Foo, Bar, Baz, }; // group use | |
$array = [1, 2, 3,]; // array | |
fooCall($arg1, $arg2, $arg3,); // function call arglist | |
class Foo { // class member lists | |
const |
This file contains hidden or 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
callable_arg_type_list: | |
/* empty */ { $$ = NULL; } | |
| '(' ')' { $$ = zend_ast_create_list(0, ZEND_AST_PARAM_LIST); } | |
| T_INT_CAST { | |
zval zv; | |
ZVAL_STRINGL(&zv, "int", sizeof("int")-1); | |
zend_ast *type = zend_ast_create_zval_ex(&zv, ZEND_NAME_NOT_FQ); | |
zend_ast *arg = zend_ast_create_ex(ZEND_AST_PARAM, 0, type, NULL, NULL); | |
zend_ast *args = zend_ast_create_list(0, ZEND_AST_PARAM_LIST); | |
zend_ast_list_add(args, arg); |
This file contains hidden or 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); | |
function crunch_data(array $data, callable(int $left, int $right): int $callback): array { | |
$result = []; | |
foreach($data as $left => $right) $result[] = $callback($left, $right); | |
return $result; | |
} | |
$crunched = crunch_data([1 => 2, 3 => 4], function(int $left, int $right): int { |
This file contains hidden or 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
T_INCLUDE | |
T_INCLUDE_ONCE | |
T_EVAL | |
T_REQUIRE | |
T_REQUIRE_ONCE | |
T_LOGICAL_OR | |
T_LOGICAL_XOR | |
T_LOGICAL_AND | |
T_INSTANCEOF | |
T_NEW |
This file contains hidden or 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
--TEST-- | |
Non delimited layer matching | |
--FILE-- | |
<?php | |
macro { | |
(T_STRING路A 路路路rest) // matches a lisp form | |
} >> { | |
T_STRING路A(路路路rest) | |
} |
NewerOlder