PHP code example of arnaud-lb / memprof

1. Go to this page and download the library: Download arnaud-lb/memprof library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

arnaud-lb / memprof example snippets


MEMPROF_PROFILE=dump_on_limit php test.php

curl http://127.0.0.1/test.php?MEMPROF_PROFILE=dump_on_limit

curl -d MEMPROF_PROFILE=dump_on_limit http://127.0.0.1/test.php
 php

memprof_dump_callgrind(fopen("output", "w"));
 php

memprof_dump_pprof(fopen("profile.heap", "w"));
 php

$dump = memprof_dump_array();