Skip to content

Instantly share code, notes, and snippets.

🐟
Something fishy?

Kalle Sommer Nielsen KalleZ

🐟
Something fishy?
Block or report user

Report or block KalleZ

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:12796fdd476adae31790284a28a52a55
c:\php-sdk\master\vc15\x64\php-src\ext\gd\gd_ctx.c(35): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
c:\php-sdk\master\vc15\x64\php-src\ext\gd\gd_ctx.c(54): warning C4244: 'return': conversion from 'SSIZE_T' to 'int', possible loss of data
c:\php-sdk\master\vc15\x64\php-src\ext\gd\gd_ctx.c(127): warning C4244: '=': conversion from 'zend_long' to 'int', possible loss of data
c:\php-sdk\master\vc15\x64\php-src\ext\gd\gd_ctx.c(129): warning C4244: '=': conversion from 'zend_long' to 'int', possible loss of data
ext\gd\gd.c(711): warning C4244: '=': conversion from 'SSIZE_T' to 'int', possible loss of data
ext\gd\gd.c(725): warning C4244: '=': conversion from 'zend_off_t' to 'int', possible loss of data
ext\gd\gd.c(727): warning C4244: '=': conversion from 'zend_off_t' to 'int', possible loss of data
ext\gd\gd.c(754): warning C4244: '=': conversion from 'SSIZE_T' to 'int', possible loss of data
ext\gd\gd.c(809): warning C4244: '=': conversion from 'zend_long' to 'int', possibl
View ezmlm-sub-master.diff
entry/subscribe.php | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/entry/subscribe.php b/entry/subscribe.php
index e25f382..4fab412 100644
--- a/entry/subscribe.php
+++ b/entry/subscribe.php
@@ -31,17 +31,15 @@ if (!preg_match("!^[a-z0-9-]+$!", $_POST['maillist'])) {
die("Invalid mailing list name");
}
View virtualprotect.diff
ext/opcache/ZendAccelerator.c | 10 ++++++++--
ext/opcache/zend_shared_alloc.c | 18 ++++++++++++++++++
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 7879de866f..802e7ed23b 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -133,8 +133,14 @@ static void preload_activate(void);
static void preload_restart(void);
View gist:d3c48f6b2143ce37ba1c2eb8f243f0aa
Recreating build dirs
ZendAccelerator.c
shared_alloc_win32.c
zend_accelerator_blacklist.c
zend_accelerator_debug.c
c:\php-sdk\master\vc15\x64\php-src\ext\opcache\ZendAccelerator.h(265): warning C4146: unary minus operator applied to unsigned type, result still unsigned (compiling source file ext\opcache\shared_alloc_win32.c)
ext\opcache\shared_alloc_win32.c(94): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
c:\php-sdk\master\vc15\x64\php-src\ext\opcache\ZendAccelerator.h(265): warning C4146: unary minus operator applied to unsigned type, result still unsigned (compiling source file ext\opcache\zend_accelerator_debug.c)
c:\php-sdk\master\vc15\x64\php-src\ext\opcache\ZendAccelerator.h(265): warning C4146: unary minus operator applied to unsigned type, result still unsigned (compiling source file ext\opcache\ZendAccelerator.c)
c:\php-sdk\master\vc15\x64\php-src\ext\opcache\ZendAccelerator.h(265): warning C4146: unary minus operator applied to unsigned type, result still unsigned (c
View remove-pcre-defs.diff
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 52da36c2cf..0b42683e40 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -60,7 +60,7 @@
# include "php_onig_compat.h"
# include <oniguruma.h>
# undef UChar
-#elif HAVE_PCRE || HAVE_BUNDLED_PCRE
+#else
View gist:f41a7272c98a0ee2c8db74a4e81681bd
C:\dev>php -v
PHP 7.3.1 (cli) (built: Jan 9 2019 22:20:52) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies
C:\dev>php foo.php
6
123456
C:\dev>
View php-intrin.diff
diff --git a/.gitignore b/.gitignore
index c0e059714d..e0b5b7211e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -225,6 +225,8 @@ php
/main/config.w32.h
/win32/build/deplister.exe
/win32/build/deplister.obj
+/win32/build/cpuinfo.exe
+/win32/build/cpuinfo.obj
View hardcode-mysqli-no-change-user-on-pconnect.diff
ext/mysqli/config.w32 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ext/mysqli/config.w32 b/ext/mysqli/config.w32
index 4d8630c27d..aeb9a1512d 100644
--- a/ext/mysqli/config.w32
+++ b/ext/mysqli/config.w32
@@ -22,7 +22,7 @@ if (PHP_MYSQLI != "no") {
"mysqli_warning.c";
View checkdnsrr.php
<?php
const SERVER_URL = 'php.net';
var_dump(checkdnsrr());
var_dump(checkdnsrr(SERVER_URL));
foreach(['A', 'MX', 'NS', 'SOA', 'PTR', 'CNAME', 'AAAA', 'A6', 'SRV', 'NAPTR', 'TXT', 'ANY'] as $type) {
printf('%s: %s%s', $type, (checkdnsrr(SERVER_URL, type) ? 'Passed' : 'Failed'), PHP_EOL);
}
?>
View permanent-hash-ext.diff
diff --git a/ext/hash/config.m4 b/ext/hash/config.m4
index 070a78102a..947031a0d5 100644
--- a/ext/hash/config.m4
+++ b/ext/hash/config.m4
@@ -3,9 +3,6 @@ dnl config.m4 for extension hash
PHP_ARG_WITH(mhash, for mhash support,
[ --with-mhash[=DIR] Include mhash support])
-PHP_ARG_ENABLE(hash, whether to enable hash support,
-[ --disable-hash Disable hash support], yes)
You can’t perform that action at this time.