Skip to content

Instantly share code, notes, and snippets.

@Girgias
Last active January 23, 2020 12:23
Show Gist options
  • Save Girgias/06253c18fde29af25ed50b29c0d8da38 to your computer and use it in GitHub Desktop.
Save Girgias/06253c18fde29af25ed50b29c0d8da38 to your computer and use it in GitHub Desktop.
Usage of "p" length modifier/format in php-src
george@DESKTOP-GEORGE-P:/mnt/c/Dev/php-src$ grep -rPbnH "(v)?(a)?s(n|l)?printf\(.*%(\+|-| |#|0)?(\d+|\*)?(\.(\d+|\*))?(p).*\)"
ext/mysqlnd/mysqlnd_vio.c:171:5443: hashed_details_len = mnd_sprintf(&hashed_details, 0, "%p", vio);
ext/opcache/jit/dynasm/minilua.c:698:21469:sprintf(buff,"%p",va_arg(argp,void*));
george@DESKTOP-GEORGE-P:/mnt/c/Dev/php-src$
george@DESKTOP-GEORGE-P:/mnt/c/Dev/php-src$ grep -rPbnH "(v)?s(tr)?pprintf\(.*%(\+|-| |#|0)?(\d+|\*)?(\.(\d+|\*))?(p).*\)"
sapi/phpdbg/phpdbg_list.c:351:11136: fake_name = strpprintf(0, "%s%c%p", filename, 0, op_array->opcodes);
sapi/phpdbg/phpdbg_prompt.c:543:16298: zend_string *source_path = strpprintf(0, "Standard input code%c%p", 0, PHPDBG_G(ops)->opcodes);
george@DESKTOP-GEORGE-P:/mnt/c/Dev/php-src$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment