轻量级 PHP 配置文件数据扩展 PHP7-forp

码农软件 · 软件分类 · 其他开发相关 · 2019-10-17 07:42:55

软件介绍

forp 是一个轻量级的 PHP 扩展,提供 PHP 配置文件数据。

总结的特性 :

  • PHP7 编译时要使用(--enable-dtrace)

  • PHP7使 用时需要设置环境变量(export USE_ZEND_DTRACE=1)

  • 测量的时间和每个函数分配的内存

  • CPU 使用率

  • 函数调用的文件和行号

  • 输出为谷歌的跟踪事件格式

  • 标题的功能

  • 分组函数

  • 别名的功能(用于匿名函数)

forp 是非侵入性的,它提供了 PHP 注释来完成工作。

Example :

<?php
// first thing to do, enable forp profiler
forp_start();

// here, our PHP code we want to profile
function foo()
{
    echo "Hello world !\n";
};

foo();

// stop forp buffering
forp_end();

// get the stack as an array
$profileStack = forp_dump();

print_r($profileStack);

Result :

Hello world !
Array
(
    [utime] => 0
    [stime] => 0
    [stack] => Array
        (
            [0] => Array
                (
                    [file] => /home/anthony/phpsrc/php-5.3.8/ext/forp/forp.php
                    [function] => {main}
                    [usec] => 94
                    [pusec] => 6
                    [bytes] => 524
                    [level] => 0
                )

            [1] => Array
                (
                    [file] => /home/anthony/phpsrc/php-5.3.8/ext/forp/forp.php
                    [function] => foo
                    [lineno] => 10
                    [usec] => 9
                    [pusec] => 6
                    [bytes] => 120
                    [level] => 1
                    [parent] => 0
                )

        )

)

本文地址:https://codercto.com/soft/d/16931.html

Math Adventures with Python

Math Adventures with Python

Peter Farrell / No Starch Press / 2018-11-13 / GBP 24.99

Learn math by getting creative with code! Use the Python programming language to transform learning high school-level math topics like algebra, geometry, trigonometry, and calculus! In Math Adventu......一起来看看 《Math Adventures with Python》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具