TAG | PHP
28
Normal Functions vs Anonymous Functions: Speed and Extensibility
No comments · Posted by joshtime in PHP
PHP5.3 comes out with a new anonymous function feature. This new feature adds a lot of new flexibility to PHP scripts. What caught my eye more is that a function can be stored inside a variable. Normal functions can not be unset. This is usually fine. But, when inplementing a plugin system to a php [...]
anonymous functions · function · PHP · plugin · speed
30
Adding Separator Between List of Items with PHP
2 Comments · Posted by joshtime in PHP, Tutorials
This is my first real PHP tutorial on this blog. I hope you enjoy it. Level: Easy Ending result: Item 1 | Item 2 | Item 3 | Item 4 Sometimes, a script may want to add a separator between items in a list. This is not as simple as it seems though. In this [...]
list · list of items · PHP · separator
20
Faster PHP Hit Counter (Counting Number of Views with MySQL)
2 Comments · Posted by joshtime in PHP, Tutorials
Sometimes, a PHP script may want to keep track of how many times the page has been viewed. The normal solution would be to do: mysqli_query(“UPDATE `table` SET `views`=`views`+1 WHERE `page`=5″); But, what if your site gets very high traffic? Then, the MySQL would be overloaded. A fix to this would be to use a [...]
I was working on Coal Games today and then I looked up settype. michaltrutman wrote this on http://php.net/manual/en/function.settype.php. You can change variable type also in another way instead of using function settype(). You can change variable type also in another way instead of using function settype(). <?PHP $a = ’125′; //$a is string var_dump($a); $a [...]
alternative · PHP · settype
While I was writing Coal Games Project, I needed an email validation function. I searched through many different sites to find a good solution. Some were overkill and made a whole class and sloppy coding. Others did not validate 100% correctly. Finally, I found the right solution: http://www.dominicsayers.com/isemail/. Everything is wrapped up into a nice [...]
email · PHP · validation
28
Alternative to mysqli_fetch_all PHP Function for MySQL
No comments · Posted by joshtime in Tutorials
While I was coding today, I tried to use the function mysqli_fetch_all on my PHP 5.2 installation. Unfortunately, this function only works on PHP 5.3 and above since it uses the new mysqlnd driver. I had to come up with a pseudo alternative to the function mysqli_fetch_all. The following is the code I came up [...]
5.2 · 5.3 · alternative · MySQL · mysqli_fetch_all · mysqlnd · PHP
For the last month or so, I have been working with WordPress a lot. I have originally thought of making my script have the same architecture as WordPress (three folders, public stuff in wp-content, hidden stuff in wp-includes, admin stuff in wp-admin) except instead of wp, it will be cg and I will try to [...]
Coal Games Project · PHP · software architecture · WordPress
This is an ongoing review of the pros and cons of different parts of WordPress. This is a review of upgrading WordPress, only a specific part of WordPress. To view the index of my reviews of WordPress’ Pros and Cons: http://joshtime.com/reviews/wordpress/ Introduction Like most computer programs, WordPress also has updates which adds better functionality to [...]
PHP is my favorite programming language because it is really easy to use (for me at least). My two favorite PHP scripts that I did not make are WordPress and MyBB. Why? Ill explain.
29
WordPress Review – Pros and Cons of Installation
No comments · Posted by joshtime in PHP, Reviews
This is an ongoing review of the pros and cons of different parts of WordPress. This is a review of installation, only a specific part of WordPress.
To view the index of my reviews of WordPress’ Pros and Cons: http://joshtime.com/reviews/wordpress-review-pros-and-cons/
Introduction
WordPress comes with a fully automated installer. The only preparation needed for installing WordPress is to set up the database information (username, password, database, host) and copying the files to the directory in which you want to install it. Installing Wordpress is very simple and is very intuitive but may be too simple.
Blog · installation · PHP · WordPress
