On Mon, Jul 14, 2014 at 01:09:42PM +0300, Arvids Godjuks wrote:

> PHP does not need a type hinting system forces you to first make a

No one is 'forcing' anything. You use it where it is appropriate; that does not
mean everywhere - there are plenty of places where I would not want to use it.

> P.S. And on that "var integer $variable" in methods/functions. People, when
> you have internal functions returning null|array, bool|array and so on -
> this is pointless.

In that case you would declare "var $variable" to receive the value from such a 
function.

The point of the use of "var" is to ensure that variables are declared before 
use.
There is a whole set of errors that can be eliminated by this -- typeos where
you assign to the 'wrong' variable.

    http://stackoverflow.com/questions/8023959/why-use-strict-and-warnings

"var integer $variable" has a use where do you know they type, eg you got it
from the typed function arguments.

As with all of this: if you don't find it then don't use it, leave it for those
who do understand the benefits.

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT 
Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: 
http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to