Lastest News from DZone PHP
Poll: Which PHP Framework do you use?
German PHP Magazine asks the developing community, which PHP Framework they use for their everyday work. Besides several popular ones, voters can also choose "other framework" or "no framework" as an option. This will hopefully show, how many have an individual approach toward developing on a PHP basis. Feel free to comment on the poll in the following article: http://it-republik.de/php/news/Neues-Quickvote-Welches-PHP-Framework-benutzt-Ihr-061706.html
Read More >
How to protect from SQL Injection with PHP
Brief recommendations to avoid SQL-Injection attacks with PHP. The importance of database users within our Web applications
Read More >
Node.js: Five Things Every PHP Developer Should Know
I recently started working on a few Node.js applications. Coming most recently from PHP (and Drupal in particular), I found the transition to Node.js to be surprisingly easy. Pleasurable, in fact. But I had to learn to think differently about a few things. Below I list the five things I think every PHP developer should know about Node.js.
Read More >
How to test Credit Card numbers using Luhn’s algorithm
Almost all credit card numbers used are generated using Luhn’s algorithm. Luhn’s algorithm is a simple checksum formula to validate variety of numbers. We can use the same formula for checking whether a given credit card number may be valid or not.
Read More >
Amazing things to do with PHP and cURL
cURL, and its PHP extension libcURL, are very useful tools for tasks like simulating a web browser, submit forms or login to a web service. In this article, I’m going to show you some amazing things that you can do using PHP and cURL.
Read More >
Singleton Pattern in PHP
The Singleton Pattern is one of the best and well-known design patterns.A singleton Pattern in one kind of design pattern and it comes when you want single instance for whole application(means you want application wide instance).
Read More >
PHPUnit Plugin For Sublime Text 2
Sublime Text 2 is a new cross-platform text editor that I’ve recently switched to. It’s still in public beta, but already offers better performance (and battery life!) and a better look (fonts that render properly!) than Java-based IDEs such as Netbeans.
Read More >
Practical PHP Refactoring: Tease Apart Inheritance
We are entering into the final part of this series, on large scale refactorings: this kind of operations is less predictable and less immediate. However, it is important to be able to perform them with small steps whenever necessary, if we don't want to get stuck in a situation with dozens of broken classes and no clear further step to take.
Read More >
Magic Methods in PHP - __toString() Method
The __toString() method is called when the code attempts to treat an object like a string. This function does not accept any arguments and should return a string.
Read More >
Programmatically Add Grouped Product to Cart in Magento
Adding simple products to cart through custom PHP code is pretty straight forward. You just need to call the '$cart->addProduct()' function with the product_id and quantity as parameters. But if you want to add grouped products to cart through your code, you will need to perform few additional steps. The process is very easy - create an '$super_group' array of the associated products with the specified quantities. Then you need to pass the array to the 'addProduct()' function. See the actual code below that makes it work:
Read More >