News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

VG Tech:
Comparing Your Privates in PHP
March 19, 2014 @ 09:56:33

In a new post to their blog, the VG Tech folks talk about "comparing your privates" with a "hidden" feature of PHP. Don't worry, they're referring to private class properties on object instances here...

I was going to compare several private properties between to objects and started making a piece of code to perform the actual comparison using getters for the properties. I felt the approach sucked, and started looking into alternatives way to do this.

He shares what the current PHP documentation shares about comparing objects, but neither of them take private properties into account. He remembers, however, that object visibility is at the class level not instance level, allowing two object instances of the same class to have access to all properties of the other, regardless of exposure level. He includes a code snippet showing how to use this to compare those private properties.

0 comments voice your opinion now!
private comparison object instance class

Link: http://tech.vg.no/2014/03/14/comparing-your-privates-in-php/

Benjamin Eberlei:
SOAP and PHP in 2014
January 31, 2014 @ 09:44:42

Benjamin Eberlei has a new post today looking at the future of SOAP in PHP for the upcoming year. In his opinion, despite negative comments and harassment the technology gets, it still has the advantage over REST.

These last years REST has gotten all the buzz, everybody seems to be using it and there are lots of talks about REST on conferences. SOAP used to be big for building APIs, but everybody seems to hate it for various reasons. I have used SOAP in several projects over the last 10 years and this blog post is a random collection of information about the state of SOAP in PHP 2014, as a reminder to myself and to others as well. Why care about SOAP in 2014? For server to server (RPC) communication it still has massive time to market and stability benefits over REST.

He points out some things REST lacks like a standard to describe endpoints and a way to automatically generate clients in any language. He then gets into some of the basics of SOAP and PHP's included functionality. He shows some of the configuration options you can use for things like debug output, exceptions and custom exception handlers. He recommends the Zend Frameworks SOAP Autodiscovery for generating WSDLs and the XSD-TO-PHP library to create objects from a well-defined WSDL. He covers the different modes you can use to "talk SOAP" and using the ZendSoapClientLocal to make a request without the need of a web server.

0 comments voice your opinion now!
soap rest comparison wsdl soapserver introduction

Link: http://www.whitewashing.de/2014/01/31/soap_and_php_in_2014.html

Samantha Quinones:
Juggle Chainsaws, Not Types
November 22, 2013 @ 09:25:33

Samantha Quinones has a new post today about something that has been known to trip up both new and experienced PHP developers - PHP's dynamic type juggling.

No matter how popular an activity it is, I really don't like to bash on PHP. Every language has its flaws when you look closely enough, and if PHP wears its idiosyncrasies a little closer to the surface than most, I think it makes up for it in other ways. PHP's handling of types, however, is confusing at best and at worst completely deranged.

She goes on to talk about the issues with type comparisons and how much trouble using the "==" (double equals) versus the "===" (triple equals) can potentially cause. While it's easier for new PHP developers to get caught by this issue, even experienced devs might miss it. She gives an example of a time in her own development involving the comparison of strings against constants and in_array's non-string type comparisons.

0 comments voice your opinion now!
type juggling strict loose comparison inarray

Link: http://www.tembies.com/2013/11/juggle-chainsaws/

ZFort Group:
The Battle of the Titans. Zend vs. Symfony
May 23, 2013 @ 11:55:45

In this new post to the ZFort blog Elena Bizina compares Symfony and Zend Framework from her perspective, looking at things like functionality, general understanding and community.

Zend and Symfony are the two frameworks that are often compared. Which one is more functional? Which one is more preferable in terms of productivity? Which one is better for general understanding? Which of these two has a larger community? I've asked Zfort Group experts to help me with these questions, and here's what we have come to.

She first gives a high-level overview of each framework, pointing out a few of the features and tools they have built-in. She then goes on to answer the questions above, noting that she sees Symfony as coming out in the lead. Some of the questions are a little vague, so it's not entirely clear why one is different than the other. What do you think? Leave a comment here with your opinions.

0 comments voice your opinion now!
zendframework symfony framework comparison

Link: http://www.zfort.com/blog/zend-vs-symfony

Codeception.com:
Specification or Testing The Comparison of Behat and Codeception
May 08, 2013 @ 09:28:34

On the Codeception site today there's a new post that compares their tool, Behat and PHPUnit for testing your applications.

This is guest post by Ragazzo. He uses Behat as well as Codeception for making his project better. He was often asked to do a comparison between Codeception, Behat, and PhpUnit. In this post he explains the commons and different parts of this products.

The author talks some about the difference between functional/acceptance tests and how they fit in with behavior driven development. He includes some examples of Behat test formats (Gherkin) and how it can be used for both the functional and acceptance side of things. He also talks some about why he prefers Codeception over Behat(+Mink) for his testing. A sample Codeception test is included, showing a login form check.

0 comments voice your opinion now!
codeception testing behat phpunit acceptance functional comparison

Link: http://codeception.com/05-06-2013/specification-testing-coparison.html

PHPBuilder.com:
PHP Forum Software Comparison
October 04, 2012 @ 12:48:08

PHPBuilder.com has posted a comparison of three PHP forums (the software to run them) - vBulletin, phpBB and Kunena.

In the past few years, there has been a great increase in the number of websites with user-generated content (UGC). One of the most common Web applications with UGC is a Web forum -- a place where people can share their impressions and opinions on different topics. As forum software is becoming more and more popular, I will compare the three best forum software products written in PHP: vBulletin, phpBB and Kunena.

They go through each of them and talk about what features they offer and some of the pros and cons of each. At the end of the post there's a table laying out each of these in a bit more easy to reference form.

0 comments voice your opinion now!
fourm software comparison vbulletin phpbb kuena


Evert Pot's Blog:
Numeric string comparison in PHP
April 26, 2011 @ 09:23:47

In this new post to his blog Evert Pot reminds you (the PHP developer) about the loose and strict typing checks that you need to do when checking the values of your variables and never just assume. PHP's loose typing tendencies can cause issues if you're not paying attention.

As long as you make sure you always use strict checking (=== and !==) where you can, and fall back to the loose checks when you must. As a PHP developer, I think it's very important to understand and memorize exactly how these work, whether you're writing new code, or maintaining existing code.

He points out a specific example of some code that seems counter-intuitive when you compare how it reads and how it actually works (strings converted to floats and evaluated)

The moral is: always do strict checks when you are able to.
0 comments voice your opinion now!
numeric comparison evaluate loose typing typecheck


Fabien Potencier's Blog:
Iterator or IteratorAggregate?
June 25, 2010 @ 12:09:44

Following up on two previous posts about iterators, Fabien Potencier is back with one more quick shot on iterator aggregation - a look what using iterator versus iteratoraggregate.

If you have ever used iterators in your code, you have probably implemented the Iterator interface. Objects of a class that implements Iterator can be iterated over with the foreach loop. [...] The IteratorAggregate interface is quite similar [to Iterator] (both interfaces implement Traversable) but creates an external Iterator. But when the iterator is based on an array, creating an external Iterator for this array gives you a more concise and more readable code.

His example code shows how, in implementing and IteratorAggregate, you can grab the instance of the Iterator even if it's based on an array.

1 comment voice your opinion now!
iterator iteratoraggregate comparison traversable interface


Giorgio Sironi's Blog:
Java versus PHP
April 16, 2010 @ 10:55:19

In a new post to his blog Giorgio Sironi has a (more balanced) comparison of Java versus PHP that them on topics like how they handle typing and their execution models.

If you exclude C and its child C++, the most popular programming languages in the world are Java and PHP, which power most of the dynamic web. I have working experience with PHP and for academical purposes I am deepening my knowledge of Java, thus I'd like to point out similarities and key differences between these two languages. Every language has its pros and cons, so there's no absolute winner here.

He briefly covers their history, java's static versus PHP's dynamic typing, how they both handle objects, their execution plans and how easy they are to deploy when it comes to general applications.

0 comments voice your opinion now!
java comparison typing oop execution infrastructure


PHPSlices.com:
PHP 5.3 vs ASP.NET 4.0 neutral comparison
April 01, 2010 @ 08:35:43

In a recent post to the phpslices.com blog there's a neutral comparison of PHP and ASP.NET based on features and a few of the common pros and cons each language has.

Consider i do not have wide experience programming with ASP.NET though i on the past used the Microsoft .NET framework. This is what i think are PRO and the CONS of both, lets consider ASP.NET 4.0 without MVC and PHP 5.3 without any framework.

Some of the pros of PHP include its low learning curve and that it's multiplatform with cons being things like performance issues and that it's more web-centric than some other languages. ASP.NET's pros include its inherent use of the .NET framework and the tools available for it with cons being that it's not Open Source, you need a Windows license to use it and that fewer web hosting providers support it.

1 comment voice your opinion now!
aspnet comparison pro con



Community Events





Don't see your event here?
Let us know!


tips symfony introduction framework release laravel language library api package podcast interview zendserver install update list opinion deployment community series

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework