PHP

Profiling PHP Applications with Xdebug

Introduction Xdebug is a PHP extension for powerful debugging. It supports stack and function traces, profiling information and memory allocation and script execution analysis. Install Xdebug on Windows Download php_xdebug.dll from official website. Edit php.ini like this: [xdebug] xdebug.profiler_enable =…

Generators in PHP

PHP official documents say: Generators provide an easy way to implement simple iterators without the overhead or complexity of implementing a class that implements the Iterator interface. Before understanding Generator, we should be understand Object Iteration. We usually use foreach…