Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- PHP



  Which one has a worse reputation, JavaScript or PHP?

There has a been a lot of criticism of PHP over being a badly designed programming language. JavaScript seems quite a similar language with loose-typing and flexible array declarations/memory management, but is widely adopted by industry leaders such as Google. Google even has a JavaScript style guide. Many people think that PHP has a worse reputation than JavaScript. Carlos Ribeiro gave his analysis on a high level which doesn't touch the language syntax. Attributing JavaScript success to it be...

   JavaScript,PHP,reputation,comparison     2014-05-03 06:26:10

  PHP to get long running process progress dynamically

Frequently in web applications, we may have a request to the back end system which may trigger a long running process such as searching huge amount of data or a long running database process. Then the front end webpage may hang and wait for the process to be finished. During this process, if we can provide the user some information about the progress of the back end process, it may improve user experience. Unfortunately, in web applications, this seems not an easy task because web scripting lang...

   AJAX,PHP,progress,long process,demo     2012-06-04 07:29:37

  Kodiak PHP can run PHP codes offline on iPad

In the eyes of the vast majority of application developers, iPad is the terminal equipment for running code, rather than the tool used to write code. However, there are some applications developers finding iPad's potential to develop a wide variety of programming applications with some applications, such as Diet Coda, Koder, Gusto and so on. The family of applications for writing applications has added a new member -  Kodiak PHP. This application runs on iPad, it can be used to develop PHP ...

   Kodiak PHP, rogramming,iPad     2012-09-24 11:54:08

  Why PHP is (so much) better than Ruby?

I attended this weekend my first Ruby conference, Ruby Lugdunum in Lyon. Besides cool talks and the fun of meeting people like Nick, Blake, or Laetitia, my friend Camille & I did a surprise lightning talk about how PHP is better than Ruby. Here are the slides and a more detailed transcript: A lot of free hosts: it’s easy to find a PHP host, you just have to google “free php host” and you find a ton of free PHP/MySQL hostsBigger community: The PHP community is really huge,...

   PHP,Ruby,Comparism,Difference,Advantage     2011-06-29 08:34:12

  strange thing in PHP session variable and local variable

A few minutes ago, I noticed one strange thing when I did my PHP web application development.The situation is described below:I want to display a user's profile using a query parameter user=user_id as the parameter. And also the session variable when user logs in  is $_SESSION["user"].So before displaying the user's profile, I need to either get the query string parameter user and create a local variable called $user and assign value to it as $user=$_REQUEST["user"].Here comes the strange t...

   PHP,session,variable name,change automat     2011-06-13 12:23:59

  PHP Apache MySQL Set-up Note

With the emergence of WAMP, LAMP, PHP developers are liberated from the tedious work of setting up PHP environment. Since PHP, Apache and MySQL are so tightly bundled, WAMP and LAMP provide a setp solution for setting up a PHP environment which includes the programming programming environment, server and database. But for a PHP who wants to learn more, you have to try to set the PHP environment yourself by installing PHP, Apache and MySQL manually and configuring them. Below is a simple note on ...

   PHP,Apache,MySQL     2014-04-07 01:56:43

  PHP function overloading puzzle clearer

PHP's meaning of overloading is different than Java's. In PHP, overloading means that you are able to add object members at runtime, by implementing some of the __magic methods, like __get, __set, __call, __callStatic. You load objects with new members. Overloading in PHP provides means to dynamically "create" properties and methods. These dynamic entities are processed via magic methods one can establish in a class for various action types. Some example:class Foo{    p...

   PHP,function overloading,OOP,default val     2011-07-11 03:24:30

  Easy Parallel Processing in PHP

The proliferation of multicore CPUs and the inability of our learned CPU vendors to squeeze many more GHz into their designs means that often the only way to get additional performance is by writing clever parallel software. One problem we were having is that some of our batch processing jobs were taking too long to run. In order to speed the processing, we tried to split the processing file into half, and let a separate PHP process run each job. Given that we were using a dual core serv...

   PHP,Parallel processing,Multithreading like,Sleep     2011-12-12 10:58:59

  Highly efficient PHP code writing

Next are some tips for writing highly efficient PHP codes. They are described below: 0. Use single quote to replace double quote, this will be better since PHP will serach for variables in double quoted strings. Note, only echo can do this; 1. If we can define methods of a class as static, then do it. It will increase access speed by 4 times; 2. $row["id"] is 7 times faster than $row[id]; 3. echo is faster than print, and also use echo's multiple parameter format such as echo $str1,$str2 inst...

   PHP,Code writing,High efficient,Tips     2011-07-23 12:35:50

  10 less known but useful PHP functions

PHP has abundant built in functions. As PHP developers, we may have used many of them. But there are still some useful functions we may not be so familiar with. In this post, we will introduce some of them. levenshtein() Have you ever wondered how to check differences between two works? This function just does what you want. It can tell you how much the difference is between two words. <?php $str1 = "carrot"; $str2 = "carrrott"; echo levenshtein($str1, $str2); //Outputs 2 ?> get_defined_va...

   PHP,function     2014-01-20 08:01:31