Advanced Search
Search Results
26 total results found
Performance of array_shift and array_pop in PHP
We have confirmed that array_shift is much slower than array_pop in PHP.Code:<?// Create an array with 100000 elements$array = array();for ($i = 0; $i < 100000; $i++) { $array[] = rand();}// Remove the last 1000 elements using array_pop$start = microtime...
Suspendable Requests for LAMP systems?
The traditional way of handling dynamically-generated Web content is to have the Web server use multiple threads, even keeping a thread pool. Then whatever program that generates the content acts as quickly as possible. As long as there are a lot of threads, t...
Common Moodle programming mistakes
Feel free to add to this list.Error handling of get_records() and its variants (e.g. get_records_sql())A common usage of these functions is like this:$records = get_records() or my_error_handler();...The problem is, if the query is executed successfully but ma...
PHP Client can break `less`
When you do php through command line (i.e. `php somescript.php`) and you pipe it to less (i.e. `php somescript.php | less`), this has the possibility of breaking the functionality of /usr/bin/less. To exit you need to type ‘q’ then hit enter.
PHP ODBC Setup Guide
Guide to setting up php-odbc for connection to Registrar database. Example for RedHat EL 5.Create file tds.datasource.template:[Registrar]Driver = FreeTDSDescription = UCLA Registrar (SRDB)Trace = NoServer = srdb.registrar.ucla.eduPort = 1433Create file t...
Mac OS X - Local Web Development Environment Setup
My name is Alex Podobas and I’m a member of the UCLA IT Security Office. My IT security work at UCLA involves an ample amount of code review and writing web applications and I use OS X as my primary, day-to-day operating system. Recently, I wiped my computer a...
Eclipse
Eclipse, for most people who use it, is an Integrated Development Environments (IDE). Although it is well-known as a Java IDE, it can be used as an IDE for other languages. Features (Note: These features applies to Eclipse + JDT. Features for other languages...
PHP Resources
PHP is a web programming language that can be compiled into the Apache web server and with its persistent connections to MySQL it makes for a very popular and fast web programming environment. PHP Cheat Sheet https://websitesetup.org/php-cheat-sheet/ Docume...