Professional Web Applications Themes

[PHP-DEV] Compatibility problems with PHP 5 - PHP Development

At 11:40 PM 12/1/2003 +0100, Stig S. Bakken wrote:  Stig, E_STRICT will be disabled by default. It is only meant for people who want to be sure that they are using the recommended methods, and that definitely includes not using var. People who don't feel like it don't need to use it. It'd be ridiculous to have two new pedantic modes just because of this. It's not as if there are so many things we can recommend on anyway. Andi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php...

  1. #21

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    At 11:40 PM 12/1/2003 +0100, Stig S. Bakken wrote: 

    Stig,

    E_STRICT will be disabled by default. It is only meant for people who want
    to be sure that they are using the recommended methods, and that definitely
    includes not using var.
    People who don't feel like it don't need to use it. It'd be ridiculous to
    have two new pedantic modes just because of this. It's not as if there are
    so many things we can recommend on anyway.

    Andi

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

    Andi Guest

  2. #22

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    Andi Gutmans wrote: 

    The problem is that it doesn't match the real world. People _are_ using
    PEAR and people _are_ using PHP4. So they simply _can't_ change var to
    public. So E_STRICT is currently way too noisy for them. Hence they'll
    not use it. That's why I think two levels (e.g. E_STRICT for backward
    compatible stuff and E_PEDANTIC for everything) makes sense. Or call it
    E_DEPRECATED and E_STRICT if you want.

    I for one would love to use E_DEPRECATED if it existed but I can't use
    E_NOTICE (I use uninitialized variables all the time, it's one of the
    main features of PHP for me) or E_STRICT (my code has to work on PHP4).

    - Chris

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

    Christian Guest

  3. #23

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    Hello Christian,

    Tuesday, December 2, 2003, 1:14:12 PM, you wrote:
     [/ref]
     
     

    I see all your concerns. But from my point of view pear has (of course) the
    problem that it is written in php4 and for php4. So PEAR needs to address
    the move towards php5 code anyway. An optional E_STRICT would help here
    wouldn't it?




    --
    Best regards,
    Marcus mailto:net

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

    Marcus Guest

  4. #24

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    Hello Melvyn,

    Tuesday, December 2, 2003, 10:53:17 AM, you wrote:
     
    >>
    >> E_STRICT already is 2048... it's just that E_ALL shouldn't include it.[/ref][/ref]
     

    This sounds like a good approach to me (at leat it is named like what it is).

    --
    Best regards,
    Marcus mailto:net

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

    Marcus Guest

  5. Moderated Post

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    Removed by Administrator
    Christian Guest
    Moderated Post

  6. Moderated Post

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    Removed by Administrator
    Andi Guest
    Moderated Post

  7. #27

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    Andi Gutmans wrote: 

    Why then introduce it at all? Or why not slightly change it to be useful
    for a lot more people?
     

    I think all of the deprecated functions with alternative names in PHP4
    already could be added to E_DEPRECATED. This would provide a useful tool
    for people trying to change outdated functions with current ones without
    sacrificing backward compatibility.

    Ok, enough from me on this thread,
    - Chris

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

    Christian Guest

  8. Moderated Post

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    Removed by Administrator
    Marcus Guest
    Moderated Post

  9. #29

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    On Tue, 2003-12-02 at 12:51, Andi Gutmans wrote: 
    >
    > Stig,
    >
    > E_STRICT will be disabled by default. It is only meant for people who want
    > to be sure that they are using the recommended methods, and that definitely
    > includes not using var.
    > People who don't feel like it don't need to use it. It'd be ridiculous to
    > have two new pedantic modes just because of this. It's not as if there are
    > so many things we can recommend on anyway.[/ref]

    I guess the core of the problem here is if E_STRICT is included in
    E_ALL. PEAR developers are encouraged to write E_ALL safe code.
    Changing that to "E_ALL & ~E_STRICT" doesn't work, because E_STRICT does
    not exist in PHP 4.

    The goal here is to assure smooth transition from PHP 4 to PHP 5 for
    PEAR users. To me that means not having to use version_compare() or
    have different versions of files for PHP 4 and 5.

    Solutions that would work for PEAR:

    * E_ALL not including E_STRICT

    * "var" equivalent to "public" (ie not throwing E_STRICT)

    - Stig

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

    Stig Guest

  10. #30

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    On Tue, 2003-12-02 at 18:43, Marcus Boerger wrote: [/ref]


    >
    > I see all your concerns. But from my point of view pear has (of course) the
    > problem that it is written in php4 and for php4. So PEAR needs to address
    > the move towards php5 code anyway. An optional E_STRICT would help here
    > wouldn't it?[/ref]

    PEAR is addressing the move towards PHP 5, but why make it more
    difficult? We can handle issues at runtime, but during compilation
    there's not much we can do.

    What we're trying to avoid is to force every package maintainer to roll
    PHP 5 specific releases for packages that still support PHP 4. Smooth
    transition requires that one package at a time can be transitioned, or
    we would create a dependency mess out of this world.

    - Stig

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

    Stig Guest

  11. #31

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    On Wed, 3 Dec 2003, Stig S. Bakken wrote:
     
    > >
    > > Stig,
    > >
    > > E_STRICT will be disabled by default. It is only meant for people who want
    > > to be sure that they are using the recommended methods, and that definitely
    > > includes not using var.
    > > People who don't feel like it don't need to use it. It'd be ridiculous to
    > > have two new pedantic modes just because of this. It's not as if there are
    > > so many things we can recommend on anyway.[/ref]
    >
    > I guess the core of the problem here is if E_STRICT is included in
    > E_ALL. PEAR developers are encouraged to write E_ALL safe code.
    > Changing that to "E_ALL & ~E_STRICT" doesn't work, because E_STRICT does
    > not exist in PHP 4.[/ref]

    That's already changed... E_ALL does not include E_STRICT anymore...

    Derick

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

    Derick Guest

  12. #32

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    On Mon, 2003-12-01 at 21:47, Andi Gutmans wrote: 
    > >
    > >Better. The only drawback is people who do want to be pedantic will get
    > >flooded by tons of warnings about var rather than being able to focus on
    > >real problems.
    > >
    > >Guess I'M being pedantic. :)[/ref]
    >
    > If they'd like to keep var then they aren't pedantic :)
    > I'm sure that even with big apps doing a search and replacing var with
    > public will take no more than half an hour.[/ref]

    It's not as simple as that. In addition to your own code, you install a
    bunch of packages, none of them maintained by yourself. Some of these
    packages you use directly from your own code, others are dependencies of
    those and so on. I would never put anything into production with a
    blind search/replace in code that I did not know well.

    - Stig

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

    Stig Guest

  13. #33

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    Stig S. Bakken wrote: 

    I think you slightly mix up PEAR developers and PEAR users but I
    completely agree with you.
     

    This kills the E_STRICT feature for both PEAR developers and PEAR users.
    More and more people will be using PEAR, who is still going to be able
    to use E_STRICT? Almost nobody.

    I can live with this solution but I find it a pitty to kill the feature
    before it is born.
     

    I'd prefer this for now.

    And before it gets forgotten: PEAR is not the only set of code which has
    to retain backward compatibility for a while. It's just a prominent example.

    - Chris

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

    Christian Guest

  14. #34

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    I can nuke E_STRICT altogether if u guys want.
    It's kind of a shame because I thought it might be nice for purists. I
    don't understand why it bothers ppl so much when they don't have to use it.

    At 12:18 PM 12/3/2003 +0100, Christian Schneider wrote: 
    >
    >I think you slightly mix up PEAR developers and PEAR users but I
    >completely agree with you.

    >
    >This kills the E_STRICT feature for both PEAR developers and PEAR users.
    >More and more people will be using PEAR, who is still going to be able to
    >use E_STRICT? Almost nobody.
    >
    >I can live with this solution but I find it a pitty to kill the feature
    >before it is born.

    >
    >I'd prefer this for now.
    >
    >And before it gets forgotten: PEAR is not the only set of code which has
    >to retain backward compatibility for a while. It's just a prominent example.
    >
    >- Chris[/ref]

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

    Andi Guest

  15. #35

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    On Wed, 3 Dec 2003, Andi Gutmans wrote:
     

    Please keep it in.

    Derick

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

    Derick Guest

  16. #36

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    On Wednesday 03 December 2003 12.59, Derick Rethans wrote: 
    >
    > Please keep it in.[/ref]

    NOOOO! Don't nuke it!

    I don't get the point some people here are trying to make.
    Their point was something about that when following E_STRICT it will (maybe)
    not work in older versions. So that means that we need to backport every
    single feature in PHP 5 to every other PHP version and get everyone to
    upgrade, otherwise noone can use the new functions ?

    If you don't need the new functions you can stick to your old version and if
    you *DO* need the new functions, well, then use them and require those who
    wants to use the scripts to upgrade their PHP or don't use the scripts.

    Maybe those who are complaining about this should complain to their computer
    manufactors too that they can't use their old EDO memory modules in their
    brand new computers ? Don't they think about BC ?!?

    Hope you all got *my* point..


    /Magnus

    --
    You will pass away very quickly.

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

    Magnus Guest

  17. #37

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    Quoting Andi Gutmans <com>:
     
    I am with Derick, it should be in. The non-purist won't use it! The non-purists
    even now doesn't use E_ALL, they don't have E_NOTICEs enabled.

    Andrey

    Just my 0.046BGL :)

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

    php@hristov.com Guest

  18. #38

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    Andi Gutmans wrote: 

    Please keep it... It will be usefull for people willing to write "good
    PHP5 code". It's about the same thing with E_NOTICES in PHP4. Not alot
    of people care about notices, but if you want to build a strong
    application, you will soon turn them on.

    Just my 2.8, eh?
    Oliver
    --
    GB/E/IT d+ s+:+ a-- C++$ UL++++$ P++++ L+++$ E- W++$ N- ?o ?K w--(---)
    !O M+$ V- PS+ PE- Y PGP t++ 5-- X+ R- tv++ b++(+++) DI++++ D+ G++ e+>++
    h(*) r y+(?)

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

    Olivier Guest

  19. #39

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    Hello Andi,

    Wednesday, December 3, 2003, 12:57:19 PM, you wrote:
     

    Args, please let it in. It helps for ppl writing php5 only code - it helps
    those ppl who didn't care about the "non existing oo features in php4" and
    want to use good php5 oo code. And again it doesn't hurt anybody with php4
    concerns (bc and whatever) since we disabled it by default and not include
    it in E_ALL.
    --
    Best regards,
    Marcus mailto:net

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

    Marcus Guest

  20. #40

    Default Re: [PHP-DEV] Compatibility problems with PHP 5

    On Wed, 3 Dec 2003, Stig S. Bakken wrote:
     

    Erm..I don't get this..E_STRICT is now OFF by default
    so how can it cause problems..?

    --Jani


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

    Jani Guest

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139