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

Anthony Ferrara:
What's In A Type
October 24, 2014 @ 13:55:39

In a new post to his site Anthony Ferrara takes on the topic of typing in PHP, discussing some of the main ideas around the current typing scheme and the discussions being have about potential changes.

There has been a lot of talk about typing in PHP lately. There are a couple of popular proposals for how to clean up PHP's APIs to be simpler. Most of them involve changing PHP's type system at a very fundamental level. So I thought it would be a good idea to talk about that. What goes into a type?

He starts at the highest level, covering what "typing" is in general and some of the tradeoffs that come with being a strongly typed versus weakly typed language. He then gets into PHP's two "semi-independent type systems" - one for objects and one for everything else. He includes some code examples to illustrate and how, for the non-object handling, context means everything for how the types are switched. He also talks about polymorphism, the chaos that could come from scalars becoming objects and a current RFC suggesting the addition of "safe casting" functions to PHP to provide less "magic" when shifting values from one type to another.

0 comments voice your opinion now!
type switching casting rfc proposal function weak strong

Link: http://blog.ircmaxell.com/2014/10/whats-in-type.html

WebTutor.pl:
Strong data typing in PHP, part II autoboxing and indestructable objects
April 14, 2011 @ 12:09:40

In the second part of their series looking at data typing in PHP, the WebTutor blog takes a different approach to supporting strong typing in PHP, using autoboxing and indestructible objects.

In an earlier article on the strong typing I've described the typehint mechanism that provides data type enforcement for the values sent to the methods and functions. Unfortunately said implementation does not protect against another problem associated with the dynamic typing of variables: a lack of type enforcement when overwritting value of an existing variable. In order to control the type of data, I decided to introduce to PHP the concept of autoboxing known from other languages such as C# and Java.

He talks briefly about what autoboxing is (wrapping primitive types into objects automatically) and links to a library that can be used to accomplish it. A bit of sample code is included showing how to create an AutoBoxedObject and how to use it in practice on some string values.

0 comments voice your opinion now!
strong data type autoboxing indestructible object


Matthew Turland's Blog:
The Yin and Yang of Typing
February 01, 2008 @ 11:58:00

A little while back Matthew Turland posted about something that some developers moving over to PHP from more strict languages have an issue with - variable typing - and how its evolved in languages over time.

Without a little background in programming languages or computer science in general, it's entirely possible that typing systems are not something that have crossed your mind. I thought I'd take a blog entry to share some of my thoughts on how it's affecting the creation and evolution of languages.

He walks through history a bit, mentioning C, Java, Python and PHP and how they differ in their default type handling. He especially focuses on the "blurred line" between strong and weak typing and how some if offers special features to the language that uses the method.

0 comments voice your opinion now!
typing strong weak strict dynamic java python c


ITJungle.com:
System i PHP Drive Going Strong, Zend Says
October 03, 2006 @ 07:12:19

From ITJungle.com today, there's a new article that talks to Zend about their effort to get PHP pushed to the System i platform via the Zend Core and the progress it's making.

The push to create a new generation of young PHP programmers and PHP-driven Web applications on the IBM System i is moving forward according to plan, according to Zend Technology, the company commercializing the open source scripting language and providing support and training services. "Things are going phenomenally well," Zend business development vice president Mike Pinette says, giving evidence of that early success. "We're firing on all cylinders."

They go on to talk about other offerings Zend is making available for the platform including their popular Zend Platform package. There's talk of how Zend's effort is spreading (across countries) and their additional focus on the "bread and butter" shops - "manufacturers, distributors, retail chains, banks, and financial institutions that have heavily invested in OS/400 and RPG over the years".

0 comments voice your opinion now!
zend systemi drive strong core studio platform zend systemi drive strong core studio platform


Chris Shiflett's Blog:
PHP Insecurity
January 24, 2006 @ 06:34:00

Chris Shiflett's latest post mentions this criticism of PHP's insecurity as made by Andrew van der Stock.

Andrew van der Stock has written a strong criticism of PHP's insecurity. Andrew is a seasoned security expert and a major contributor to OWASP, and he states:

"After writing PHP forum software for three years now, I've come to the conclusion that it is basically impossible for normal programmers to write secure PHP code. It takes far too much effort."

He continues, citing specific areas where he thinks PHP is weak and asserting that "PHP must now mature and take on a proper security architecture."

Chris also mentions that some of the reasons Andrew mentions include register_globals, magic_quotes_gpc, and safe_mode - all due to be removed in the latest PHP version (6). Also, be sure to check out the comments on the post for a good bit more information and discussion...

0 comments voice your opinion now!
insecurity security strong criticism against too much power insecurity security strong criticism against too much power



Community Events





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


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

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