Stack debugging in php
Do you want to know which files are called by the current function? If we know these paths, we can well understand the execution process of the program. This is very important and is also the basis for understanding other people's programs. So here I will give you Let’s introduce a stack debugging method in php. It is actually a function built into phpdebug_backtrace();
The following is a brief introduction. You still need to read the manual for details. Programmers who like to read manuals are The promising
<code>$statcks = debug_backtrace(); $tmp_arr = array(); <span>if</span>(!$stacks) <span>return</span> $tmp_arr; foreach($stacks as $k=>$v) { $tmp[$k][<span>'file'</span>] = isset($v[<span>'file'</span>]) ? $v[<span>'file'</span>] : <span>'--'</span>; $tmp[$k][<span>'line'</span>] = isset($v[<span>'line'</span>])? $v[<span>'line'</span>] : <span>'--'</span>; $tmp[$k][<span>'function'</span>] = isset($v[<span>'function'</span>]) ? $v[<span>'function'</span>] : <span>'--'</span>; } Array ( [<span>0</span>]<span> =></span> Array ( [file]<span> =></span><span>D</span>:\wwwroot\CodeIgniter\application\controllers\finance\channel.php [line]<span> =></span><span>128</span> [<span>function</span>]<span> =></span> get_total_rows ) [<span>1</span>]<span> =></span> Array ( [file]<span> =></span> -- [line]<span> =></span> -- [<span>function</span>]<span> =></span> index ) [<span>2</span>]<span> =></span> Array ( [file]<span> =></span><span>D</span>:\wwwroot\CodeIgniter\application\controllers\finance\channel.php [line]<span> =></span><span>46</span> [<span>function</span>]<span> =></span> call_user_func ) [<span>3</span>]<span> =></span> Array ( [file]<span> =></span> -- [line]<span> =></span> -- [<span>function</span>]<span> =></span> get_nav ) [<span>4</span>]<span> =></span> Array ( [file]<span> =></span><span>D</span>:\wwwroot\CodeIgniter\system\core\CodeIgniter.php [line]<span> =></span><span>360</span> [<span>function</span>]<span> =></span> call_user_func_array ) [<span>5</span>]<span> =></span> Array ( [file]<span> =></span><span>D</span>:\wwwroot\CodeIgniter\index.php [line]<span> =></span><span>205</span> [<span>function</span>]<span> =></span> require_once ) )</code>
Here is the printed array, very good
Copyright statement: This article is an original article by the blogger and may not be reproduced without the permission of the blogger.
The above introduces stack debugging in PHP, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Many users will choose the Huawei brand when choosing smart watches. Among them, Huawei GT3pro and GT4 are very popular choices. Many users are curious about the difference between Huawei GT3pro and GT4. Let’s introduce the two to you. . What are the differences between Huawei GT3pro and GT4? 1. Appearance GT4: 46mm and 41mm, the material is glass mirror + stainless steel body + high-resolution fiber back shell. GT3pro: 46.6mm and 42.9mm, the material is sapphire glass + titanium body/ceramic body + ceramic back shell 2. Healthy GT4: Using the latest Huawei Truseen5.5+ algorithm, the results will be more accurate. GT3pro: Added ECG electrocardiogram and blood vessel and safety

How to convert php blob to file: 1. Create a php sample file; 2. Through "function blobToFile(blob) {return new File([blob], 'screenshot.png', { type: 'image/jpeg' })} ” method can be used to convert Blob to File.

Use Java's File.length() function to get the size of a file. File size is a very common requirement when dealing with file operations. Java provides a very convenient way to get the size of a file, that is, using the length() method of the File class. . This article will introduce how to use this method to get the size of a file and give corresponding code examples. First, we need to create a File object to represent the file we want to get the size of. Here is how to create a File object: Filef

To learn more about open source, please visit: 51CTO Hongmeng Developer Community https://ost.51cto.com Running environment DAYU200:4.0.10.16SDK: 4.0.10.15IDE: 4.0.600 1. To create an application, click File- >newFile->CreateProgect. Select template: [OpenHarmony] EmptyAbility: Fill in the project name, shici, application package name com.nut.shici, and application storage location XXX (no Chinese, special characters, or spaces). CompileSDK10, Model: Stage. Device

Use Java's File.renameTo() function to rename files. In Java programming, we often need to rename files. Java provides the File class to handle file operations, and its renameTo() function can easily rename files. This article will introduce how to use Java's File.renameTo() function to rename files and provide corresponding code examples. The File.renameTo() function is a method of the File class.

Function means function. It is a reusable code block with specific functions. It is one of the basic components of a program. It can accept input parameters, perform specific operations, and return results. Its purpose is to encapsulate a reusable block of code. code to improve code reusability and maintainability.

Use java's File.getParent() function to get the parent path of a file. In Java programming, we often need to operate files and folders. Sometimes, we need to get the parent path of a file, which is the path of the folder where the file is located. Java's File class provides the getParent() method to obtain the parent path of a file or folder. The File class is Java's abstract representation of files and folders. It provides a series of methods for operating files and folders. Among them, get

Why Snipping Tool Not Working on Windows 11 Understanding the root cause of the problem can help find the right solution. Here are the top reasons why the Snipping Tool might not be working properly: Focus Assistant is On: This prevents the Snipping Tool from opening. Corrupted application: If the snipping tool crashes on launch, it might be corrupted. Outdated graphics drivers: Incompatible drivers may interfere with the snipping tool. Interference from other applications: Other running applications may conflict with the Snipping Tool. Certificate has expired: An error during the upgrade process may cause this issu simple solution. These are suitable for most users and do not require any special technical knowledge. 1. Update Windows and Microsoft Store apps
