Use Strace to view the C language PHP source code

Source: Internet
Author: User
Tags php source code

If you want to see C-level PHP code you need to use Strace

This default is installed, if no installation can

#yum Install Strace


View the httpd process (no Web server is required to install one)

#ps Auxw | grep httpd


There are multiple that must stop Apache

[[email protected] usr]#/usr/local/webserver/apache2/bin/apachectl stop

Start single Process httpd

[[email protected] usr]#/usr/local/webserver/apache2/bin/apachectl-x-K Start

Re-use #ps Auxw | grep httpd View Only single frequently, note the process ID

Bind the Strace to Apache

#strace-P 28224

Algorithm

Quickly sort PHP code

[PHP] View plain Copy

<?php

function QuickSort ($arr)

{

$len = count ($arr);

if ($len <= 1) {

return $arr;

}

$key = $arr [0];

$left _arr = Array ();

$right _arr = Array ();


for ($i =1; $i < $len; $i + +) {

if ($arr [$i] <= $key) {

$left _arr[] = $arr [$i];

} else {

$right _arr[] = $arr [$i];

}

}


$left _arr = QuickSort ($left _arr);

$right _arr = QuickSort ($right _arr);

Return Array_merge ($left _arr, Array ($key), $right _arr);

}



$arr = Array (6,3,8,5,9,2,10);

Echo ' <pre> ';

Print_r (QuickSort ($arr));

?>

Request a PHP page in the browser to get tracking information

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/95/08/wKioL1kRKeaARdBRAAMB2OYivhw122.jpg-wh_500x0-wm_ 3-wmp_4-s_2312454547.jpg "title=" 1353168650_1695.jpg "alt=" Wkiol1krkeaardbraamb2oyivhw122.jpg-wh_50 "/>


The function description of the call can be viewed with man

such as: Man command to check getsockname

This article is from the "I am the program my biggest" blog, please be sure to keep this source http://skinglzw.blog.51cto.com/10729606/1923535

Use Strace to view the C language PHP source code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.