2010/5/14 Johannes Schlüter <johan...@schlueters.de>

>  > <?php
> > require
> > (
> >     'utila.php',
> >     'utilb.php',
> >     'utilc.php',
> > )
>
> What's te benefit, other than saving a few chars on the cost of being
> more explicit. I don't see any benefit.
>

make php more productive is always good.


>
> Doing this would mean an error to include one of these files would give
> an imprecise error message. Given
>
> <?php
> require(
>    $a,
>    $b
> );
> ?>
>
> fails it will always tell you about an error in line 5 (basically where
> the ; is)
>
>
there are others cases where error is imprecise

1. if($a==$b){
2.
3. if($c==$d){...}

the error will be raised at line 3 without a precise messagem. this is a
trivial code and have imprecise message error.


> > or more, withou .php
> > <?php
> >
> > require
> > (
> >     'utila',
> >     'utilb',
> >     'utilc',
> > )
>
> that makes no sense. It would have to check for two files, and why
> only .php? Why not .inc or .class or whatever people are using?
>
>
utila.inc will be include utila.inc.php,
utila.class will be include util.class.php

if you use utila.class without php in your project, its is a security
problem.

if string dont finish with .php, .php will be included,



 Again, I see no benefit (and no, a few characters more are no trouble,

> writing code is never the hard part. The hard part is maintenance ...
> and a proper IDE serves quite well for saving key strokes ...)
>
> johannes
>
>
forget IDE. think in a simple text editor without any resources...
php is php, IDE is IDE.

few character less can be good.

se one php example:
HTTP_POST_VARS => _POST

it always good write less and do more.

the main php ideia is to write less and do more,or we would be still writing
pages in ANSI C or assembly


-- 
Att.
Mathias Grimm

http://mathiasgrimm.com.br
http://phpempregos.com.br

Reply via email to