Skip to content

124 search results for "php"

GoDaddy and disabled PHP functions

During a support issue with a user of one of my web applications I made a fairly important discovery about GoDaddy.com and how they have PHP installed on their servers. Many functions – 44 last time I looked – are disabled. Now, this may just be with their economy package and they have them enabled on their higher packages as an incentive to upgrade, but it caught me off guard.

Benchmarking PHP: Is it possible to have too many comments?

PHP is an interpreted language; and as such, the computer needs to process the script each time it is run. Honestly, I don’t know much about the internal workings of PHP; so I don’t know how it handles comments in the code. More specifically, I don’t know how well it handles comments.

I have seen sites over the web going back and forth on whether it’s possible to have too many comments. Most I found said that it didn’t really matter; a few said it slowed execution. As I tend to be the type to over comment my code, I decided to test it for myself with some over the top commented code.

A quick PHP function to get Post, Get, or Session variables; and Cookies too

It should be pretty easy to get $_GET, $_POST, $_SESSION, or $_COOKIE variables in PHP code. The problem is that just entering $_GET[‘variable’] causes an error if the variable does not exist. What’s needed is a way to open the variable, and get a blank string if the variable is not defined.

Benchmarking PHP: Inserting text with include(), require(), or get_file_contents()

Often times in PHP you find yourself needing to insert text. Most sites do this by using a database backend, but you also have the option to include data from a text file. Three methods are available for this; require, include, and file_get_contents. Which is fastest, which is best? When should you use one over the other?

Can't find what you're looking for? Try refining your search: