Skip to content

Instantly share code, notes, and snippets.

View ekinhbayar's full-sized avatar

Ekin ekinhbayar

View GitHub Profile
DUMPING response yielded from socket->ask()
array(0) {
}
FOUND MultiReasonException, DUMPING (var_dump($dnsException->getPrevious()->getReasons());)
array(2) {
[1]=>
object(TypeError)#270 (7) {
["message":protected]=>
➜ gitampLatest git:(v2_rewrite) ✗ /usr/local/bin/php vendor/bin/aerys -c server.php -d
[2017-06-30 20:03:32] warning Running aerys in debug mode with assertions disabled is not recommended; enable assertions in php.ini (zend.assertions = 1) or disable debug mode (-d) to hide this warning.
[2017-06-30 20:03:32] info Using config file found at /home/ekinhb/PhpstormProjects/gitampLatest/server.php
[2017-06-30 20:03:32] gitamp.INFO: Listening on tcp://0.0.0.0:1337 [] []
[2017-06-30 20:03:32] gitamp.INFO: Listening on tcp://[::]:1337 [] []
FOUND MultiReasonException, DUMPING (var_dump($dnsException->getPrevious()->getReasons());)
array(2) {
[1]=>
➜ gitampLatest git:(v2_rewrite) ✗ /usr/local/bin/php vendor/bin/aerys -c server.php -d
[2017-06-30 17:14:25] warning Running aerys in debug mode with assertions disabled is not recommended; enable assertions in php.ini (zend.assertions = 1) or disable debug mode (-d) to hide this warning.
[2017-06-30 17:14:25] info Using config file found at /home/ekinhb/PhpstormProjects/gitampLatest/server.php
[2017-06-30 17:14:25] gitamp.INFO: Listening on tcp://0.0.0.0:1337 [] []
[2017-06-30 17:14:25] gitamp.INFO: Listening on tcp://[::]:1337 [] []
[2017-06-30 17:14:25] gitamp.ERROR: Failed to send GET request to API endpoint {"exception":"[object] (Amp\\Artax\\DnsException(code: 0): Resolving the specified domain failed: 'api.github.com:443' at /home/ekinhb/PhpstormProjects/gitampLatest/vendor/amphp/artax/lib/BasicClient.php:344, Amp\\Dns\\ResolutionException(code: 0): All query attempts failed at /home/ekinhb/PhpstormProjects/gitampLatest/vendor/amphp/dns/lib/BasicResolver.php:132, Am
(gdb) run -d opcache.protect_memory=1 -d opcache.enable_file_override=1 -dopcache.validate_timestamps=1 -d opcache.file_update_protection=0 -d opcache.revalidate_freq=0 test.php
Starting program: /usr/local/bin/php713 -d opcache.protect_memory=1 -d opcache.enable_file_override=1 -dopcache.validate_timestamps=1 -d opcache.file_update_protection=0 -d opcache.revalidate_freq=0 test.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007fffed937f70 in validate_timestamp_and_record (persistent_script=0x7fffe53924c0, file_handle=0x7fffffffa870) at /opt/php-src/ext/opcache/ZendAccelerator.c:958
958 persistent_script->dynamic_members.revalidate = ZCG(request_time) + ZCG(accel_directives).revalidate_freq;
(gdb) bt
#0 0x00007fffed937f70 in validate_timestamp_and_record (persistent_script=0x7fffe53924c0, file_handle=0x7fffffffa870) at /opt/php-src/ext/opcache/ZendAccelerator.c:958
@ekinhbayar
ekinhbayar / valgrind_udp_bind.phpt.log
Last active May 8, 2017 16:07
7.1.4RC1 ( ZTS DEBUG )
ek1n# USE_ZEND_ALLOC=0 /usr/bin/valgrind --track-origins=yes --tool=memcheck --leak-check=full php examples/udp_bind.php
==32596== Memcheck, a memory error detector
==32596== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==32596== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==32596== Command: php examples/udp_bind.php
==32596==
object(UVUdp)#2 (0) {
}
success
recv:Hello==32596== Invalid read of size 4
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Check uv_async has no memory leak [tests/006-uv_async_init-no-memory-leak.phpt]
Check to make sure uv_loop_new can be used [tests/010-uv_loop_new.phpt]
Check for uv_async [tests/100-uv_async.phpt]
Check for udp bind [tests/500-udp_bind.phpt]
Check for udp bind [tests/500-udp_bind6.phpt]
=====================================================================
@ekinhbayar
ekinhbayar / paradox.php
Last active April 29, 2017 19:29
Quick try at making this: https://github.com/abdullah/paradoks work on cli
<?php
$paradox = [[], [], [], [], [], []];
for ($p1 = 1; $p1 < 64; $p1 += 2) {
$paradox[0][] = $p1;
}
for ($p2 = 2; $p2 < 64;) {
$paradox[1][] = $p2;
$_main: ; (lines=4, args=0, vars=0, tmps=1)
; (before block pass)
; test.php:1-19
BB0: start exit lines=[0-3]
NOP
INIT_FCALL 0 304 string("test")
DO_UCALL
RETURN int(1)
$_main: ; (lines=4, args=0, vars=0, tmps=1)
--TEST--
Bug #74431 - foreach infinite loop
--INI--
opcache.enable=1
opcache.enable_cli=1
--FILE--
<?php
function test(){
$arr = [1,2];
$j = 0;
<?php
$b = 1;
$fn = function () use ($b)
{
$a = $b * 2;
var_dump($a);
};
/**