Hi,

The arguments why to deprecate didn't seem much more than, this maybe could be 
deprecated. I think there should usually be some
benefits of deprecating, otherwise why not just leave it as it is?

But some comments that I didn't notice in others.

>    - php_uname (use PHP_OS constant)

PHP_OS is php_uname('s'), how about rest:

mode

    mode is a single character that defines what information is returned:

        'a': This is the default. Contains all modes in the sequence "s n r v 
m".
        's': Operating system name. eg. FreeBSD.
        'n': Host name. eg. localhost.example.com.
        'r': Release name. eg. 5.1.2-RELEASE.
        'v': Version information. Varies a lot between operating systems.
        'm': Machine type. eg. i386.


> Classes/Objects functions:
>   - is_a (use instanceof operator)
>   - is_subclass_of (not exactly what it's purpose is but the instanceof
>   operator SHOULD be a valid equivalence with another condition if the same
>   class must not be used)

Both these have $allow_string 

> Function handling functions:
>   - call_user_func (invoke directly)

Yes, they give a little performance hit, but I still kind of like them. Like if 
we think the following, I think I would prefer call_user_func for syntax.

class PREA {
        public function AB() {
                echo "HELLO".PHP_EOL;
        }
        public static function AC() {
                echo "HELLOSTATIC".PHP_EOL;
        }
}

$prefix='PRE';
$class='A';
$method='B';
$static='C';

$classVar=$prefix.$class;

(new $classVar())->{$class.$method}();
($prefix.$class)::{$class.$static}();

call_user_func(array(new $classVar(), $class.$method));
call_user_func($prefix.$class.'::'.$class.$static);

And for the rest. Yes, there is another way of doing it, but is that really 
enough for deprecating something?

> Setting var type (can use variable casting nowadays):

Yes, we can cast, but is this reason for make someone to go through all the old 
code and do
-$var = intval($var);
+$var = (int) $var;

 

Reply via email to