Skip to content

Instantly share code, notes, and snippets.

Yoshio HANAWA hnw

View GitHub Profile
View opcache-bug-for-huge-array.php
This file has been truncated, but you can view the full file.
<?php
function foo($bar) {
$array = [
"x1"=>["y"=>1],
"x2"=>["y"=>1],
"x3"=>["y"=>1],
"x4"=>["y"=>1],
"x5"=>["y"=>1],
"x6"=>["y"=>1],
View diff-unixtime2tm-c.txt
*** ext/date/lib/unixtime2tm.c~ 2019-08-28 12:01:15.000000000 +0900
--- ext/date/lib/unixtime2tm.c 2019-12-11 20:37:52.000000000 +0900
***************
*** 56,61 ****
--- 56,67 ----
cur_year += YEARS_PER_LYEAR_PERIOD * (tmp_days / DAYS_PER_LYEAR_PERIOD);
tmp_days -= DAYS_PER_LYEAR_PERIOD * (tmp_days / DAYS_PER_LYEAR_PERIOD);
}
+ printf("tmp_days=%lld, year=%lld\n", tmp_days, cur_year);
+ if (ts >= 0 && tmp_days == 0) {
View hoge.md
{
   "foo": [3,4,5]
}
View 1092104.json
{
"title": "Use Japanese Keyboard as US Keyboard",
"rules": [
{
"description": "Ctrl+@ to Escape",
"manipulators": [
{
"type": "basic",
"conditions": [
{
View 1092104.json
{
"title": "Use Japanese Keyboard as US Keyboard (rev 1)",
"rules": [
{
"description": "Ctrl+@ to Escape",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "open_bracket",
View 1092104.json
{
"title": "Remap Japanese Keyboard to US (rev 1)",
"rules": [
{
"description": "Ctrl+@ to Escape",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "open_bracket",
View 1092104.json
{
"title": "Remap Japanese Keyboard to US",
"rules": [
{
"description": "Ctrl+@ to Escape",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "open_bracket",
View deployment-manager-types-list-20181113.txt
---
provider: gcp-types/appengine-v1
types:
- apps
- apps.locations
- apps.authorizedCertificates
- apps.services
- apps.services.versions
- apps.services.versions.instances
- apps.authorizedDomains
View bitshift.c
#include <stdio.h>
#include <limits.h>
int main()
{
long i1 = -1;
long i2 = LONG_MIN; // -9223372036854775808
unsigned long u = ULONG_MAX; // 18446744073709551615
printf("%ld\n", i1>>1); // 最上位ビット維持、算術シフト (-1)
View hoge999.php
<?php
abstract class Foo {
abstract public function func(int $y);
}
class Bar extends Foo {
public function func(int $y) {
return 1;
}
You can’t perform that action at this time.