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
#!/home/doc/php/bin/php | |
<?php | |
$exit = 0; | |
$exit_signal = 0; | |
function fork() | |
{ | |
$pid = pcntl_fork(); | |
if ($pid < 0) { |
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
{ | |
<insert_a_suppression_name_here> | |
Memcheck:Leak | |
fun:malloc | |
fun:init_op_array | |
fun:compile_file | |
obj:* | |
... | |
fun:zend_execute_scripts | |
fun:php_execute_script |
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
==6700== 36 bytes in 1 blocks are still reachable in loss record 14 of 39 | |
==6700== at 0x4C28C20: malloc (vg_replace_malloc.c:296) | |
==6700== by 0x9FC2DE: Balloc (zend_strtod.c:600) | |
==6700== by 0x9FC7EC: mult (zend_strtod.c:879) | |
==6700== by 0x9FCA7F: pow5mult (zend_strtod.c:1007) | |
==6700== by 0xA00836: zend_dtoa (zend_strtod.c:4178) | |
==6700== by 0x942CD1: __cvt (snprintf.c:96) | |
==6700== by 0x942E66: php_fcvt (snprintf.c:138) | |
==6700== by 0x943389: php_conv_fp (snprintf.c:389) | |
==6700== by 0x944DD3: format_converter (snprintf.c:1036) |
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 | |
class Foo | |
{ | |
public function __invoke($arg) | |
{ | |
yield $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
#! /usr/bin/env php | |
<?php | |
if ($argc != 2) { | |
exit(sprintf("Usage : %s <pid>\n", $argv[0])); | |
} | |
if (!file_exists("/proc/1/status")) { | |
exit("/proc/1/status does not exist, what OS are you running ?\n"); |
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
#!/bin/bash | |
pool1=pool_1 | |
pool2=pool_2 | |
port1=8031 | |
port2=8032 | |
nbport1=0 | |
nbport2=0 |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/stat.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
int main(int argc, char **argv) | |
{ | |
if (argc != 3) { | |
printf("Usage: allocate <1:ftruncate, 2:fallocate> <size> \n"); |
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
160 char *str1 = "mystring"; | |
7ffff6240c71: lea 0xf2(%rip),%rax # 0x7ffff6240d6a | |
7ffff6240c78: mov %rax,-0x8(%rbp) | |
161 char *str2 = NULL; | |
7ffff6240c7c: movq $0x0,-0x10(%rbp) | |
165 memcpy(&str2, &str1, sizeof(char *)); | |
7ffff6240c84: mov -0x8(%rbp),%rax | |
7ffff6240c88: mov %rax,-0x10(%rbp) | |
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 | |
$s = (new PDO("sqlite::memory:"))->query("SELECT 1"); | |
$s->setFetchMode(PDO::FETCH_INTO, $o); | |
$s->fetch(); | |
/* General error: object must be an object */ |
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
$o1 = new stdclass($a=8); | |
var_dump($a); // Notice: Undefined variable: a | |
$o2 = new Datetime($b='now'); | |
var_dump($b); // string "now" |
NewerOlder