Skip to the main content

Professional paper

BENCHMARKING PHP MODULES

Alen Šimec ; Zagreb University of Applied Sciences, Zagreb, Croatia
Davor Lozić ; Zagreb University of Applied Sciences, Zagreb, Croatia
Lidija Tepeš Golubić ; Zagreb University of Applied Sciences, Zagreb, Croatia


Full text: english pdf 918 Kb

page 95-100

downloads: 569

cite


Abstract

This paper presents how C programming language could be used for this type of tasks, created as PHP module and then get imported in the PHP language. The purpose of this paper is to show how and when is better to build PHP modules in C, instead of normal PHP functions, and to show negative sides of this type of programming. Profiling, as an important aspect of finding application bottlenecks, is also discussed. Profiling systems like Xdebug, Qcachegrind and Webgrind are also elucidated. This paper contains source code which calculates Fibonacci sequence and multiplies 800x800 matrices written in C and PHP programming languages. Results show that whenever there is a need for a mathematical computation, C will be many times faster and that it is much more cost-effective to write such code in C and create a PHP module.

Keywords

benchmarking; PHP internals; PHP modules; scripting language; server side

Hrčak ID:

183672

URI

https://hrcak.srce.hr/183672

Publication date:

28.6.2017.

Article data in other languages: croatian

Visits: 1.788 *