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

SEARCH KEYWORD -- PHP



  How to send asynchronous requests in PHP

It’s easy to make asynchronous calls in PHP with just a little bit of HTTP header knowledge and some library code around PHP sockets. This technique is useful when posting requests to your own server for bits of logic you’d like to run in the background.  If you don’t control the endpoint, you might not be comfortable with some of the limitations, such as the inability to read anything from the response.  So, you couldn’t post data to a we...

   PHP,Asynchronous request,socket     2012-04-28 06:45:51

  JavaScript-style object literals in PHP

The object literal notation in JavaScript looks like: var fido = {name: "Fido", barks: true}; or var fido = {}; fido.name = "Fido"; fido.barks = true; From assoc arrays to objects In PHP you would call that an associative array. $fido = array( 'name' => "Fido", 'barks' => true ); And you can easily make it an object too: $fido = (object)$fido; echo gettype($fido); // "object" Or if you want to start with a blank object and add stuff to it: $fido = (object)array(); or $fido...

   PHP,JavaScript,Object,Function call,Self vs this     2011-11-30 11:11:45

  The Future of JavaScript � take a peek today!

The ECMA committee is working hard on designing the next version of JavaScript, also known as "Harmony". It is due by the end of next year and it is going to be the most comprehensive upgrade in the history of this language. Chrome and V8 are committed to pushing JavaScript forward and have already started implementing the new features. You can try some of them today in the latest dev channel release. Here’s a summary: Lexical scoping. Now "let" is the new "var" – traditional "var...

   JavaScript,Future,Feature     2012-02-12 04:56:37

  Collection Of Puzzles For Programmers

Did you know that we have a nice collection of puzzles here on less than dot? Some are harder than others so there is something for everyone. You can pic any language you want, you will see that there are solutions in Ruby, Python, Visual Basic, SQL, JavaScript, C++ and other. Here is a partial list of what we have Friday the Thirteenths The goal is to identify all friday the thirteenths for a given timeframe Regular Pentagon Given a grid co-ordinate (x,y) as the centre point of a regu...

   Programming puzzle,Fibonacci,Prime,ASCII     2012-01-04 08:06:18

  PHP Sucks! But I Like It!

I read a rather interesting post yesterday called PHP: a fractal of bad design. It's been getting a lot of traffic among the PHP community lately because it's rather inflammatory. But to be honest, it does make a lot of really good points. It also makes a lot of mistakes and misses a bigger picture. A Few Mistakes The post makes quite a few mistakes and odd apples to oranges comparisons. Let me point out the major ones that I saw. No Debugger - PHP has xdebug which works quite...

   PHP,Bad design,Like     2012-04-12 06:15:42

  Top 10 PHP Best Security Practices for Sys Admins

PHP is widely used for various of web development. However, misconfigured server-side scripting would create all sorts of problem. And here are php security best practices that you should aware when configuring PHP securely. Nowadays most of the web servers are operated under Linux environment (like: Ubuntu, Debian...etc). Hence, in the following article, I am going to use list top 10 ways to enhance PHP Security Best Practices under Linux environment. My sample setup for PHP Security Tips: D...

   PHP,code security,System admin,Advice,Best practice     2012-02-01 00:04:37

  PHP sucks (but, some frameworks don't)

I started web development with PHP, and I've decided I've had enough. Why? Keep reading.PHP (the language) sucks. There, I said it. 1029380128301928301823 GlobalsObject system hacked onC extension system sucksDocumentation sucks (read more; no, I'm not drunk)Has a terrible communityAll in all, designed by total idiots. You've probably heard this a ton of times before, but, here it is again. THERE ARE JUST WAY TOO MANY GLOBALS. Why in the world does md5() need to be global? Do you serio...

   PHP,Sucks,Framework,Good,Bad Design     2011-11-20 07:08:16

  6 time management tips for startups

Many people are fighting for their startups, they are willing to put all their time in company operations. This 24x7 passion is necessary for startup founders. For the team in startups, the most important thing is time management, time management is a top challenge for everyentrepreneur. After years of experience working with entrepreneurs and business owners, Rieva Lesonsky has  learned a few tricks for getting more done in the 24 hours we all have. Here are 6 tips what he shared...

   startup,time management     2012-05-29 05:30:07

  Dates in PHP and MySQL

I see a lot of people on forums and on my training courses asking about the best way (or any way) to manage dates stored in a MySQL database and used in PHP. Three options follow, but first the problem.PHP uses unix timestamps for all its date functionality. It has methods to convert these timestamps into pretty much any text format you could want but internally it uses the timestamp format. A timestamp is simply an integer. Specifically, it’s the number of seconds that have ela...

   PHP,MySQL,Date format,Date,Comparison,Date compare     2011-10-17 14:00:57

  5 Lightweight PHP Frameworks For Creating An API

PHP is undoubtedly one of the most popular programming languages that offer a wide range of lightweight frameworks for building basic websites to REST APIs. These frameworks are powerful tools that have the potential to enhance productivity in order to deliver faster results without getting distracted from the best practices of development. Developing REST APIs with plain PHP is a tedious and time-consuming process. In order to sort this out, you only need to hire php developers who have a niche...

   PHP,API     2018-10-22 07:55:34