Professional Web Applications Themes

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

On Nov 27, 2003, at 8:41 AM, Christian Schneider wrote:   > > Ok, I declare it a bug then so you can include it in the next bug fix > release.[/ref] I lost the beginning of the thread - what's the bug? That __clone() doesn't exist in php4? All sorts of object model features don't exist in php4, that's one of the major feature set additions in php5. George -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php...

  1. #1

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


    On Nov 27, 2003, at 8:41 AM, Christian Schneider wrote:
     
    >
    > Ok, I declare it a bug then so you can include it in the next bug fix
    > release.[/ref]

    I lost the beginning of the thread - what's the bug? That __clone()
    doesn't exist in php4? All sorts of object model features don't exist
    in php4, that's one of the major feature set additions in php5.


    George

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

    George Guest

  2. #2

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

    Andi, any chance of fixing this? I think there was a long thread on engine2
    about this and there was an agreement that this should work as in php4.

    Edin


    On Thursday 27 November 2003 13:47, Derick Rethans wrote: 
    > >
    > > What exactly is the problem with stdClass? We have a lot of code overhere
    > > that rely on stdClass behaiving as it did in php4.[/ref]
    >
    > By doing this:
    >
    > <?php
    > $tpl->foo = 'blaat';
    > ?>
    >
    > in PHP 4 you would get a object of stdClass, in PHP 5 you get a warning.
    >
    > Derick[/ref]

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

    Edin Guest

  3. #3

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

    Greetings:

    I have been testing/tweaking PHP 5 via a major OOP based project of mine
    that relies on PEAR::DB. There are some major hangups, most of which I've
    mentioned in other places. To be complete, I'll touch on them here.

    1) The "var: Deprecated." warning from the new E_STRICT level is a real
    pain. Now, in order to have code that will run under PHP 4 and 5, all
    users will have to change their errro reporting level to * ~E_STRICT.
    Worse, since strict is disabled, people won't be able to see really major
    deprication problems problems. I urge var deprication be removed from
    E_STRICT until PHP 5 deployments far outweigh PHP 4 deployments.


    2) Argv and argc are not being defined anymore. Haven't heard back on
    either the bug report or the thread I started here.

    http://bugs.php.net/bug.php?id=26206
    [PHP-DEV] argv & argc not defined. intentional? bug 26206
    http://groups.google.com/groups?threadm=bp3rs1%249p0%241%40FreeBSD.csie.NCT U.edu.tw


    3) Return by reference's bizarre behaviors. I'm in favor of making it
    just work for actual cases where variables (hence real references) are
    being returned. Discussion:

    [PHP-DEV] return by reference behaviors in PHP 5
    http://groups.google.com/groups?threadm=bpuutq%24fbf%241%40FreeBSD.csie.NCT U.edu.tw


    4) When loading the class files PHP crashes. Bug report:

    http://bugs.php.net/?id=26418


    Thanks,

    --Dan

    --
    FREE scripts that make web and database programming easier
    http://www.ysisandsolutions.com/software/
    T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
    4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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

    Daniel Guest

  4. #4

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

    On Thu, 27 Nov 2003, Daniel Convissor wrote:
     

    Strict is strict, that's the whole point. You can either fix your code
    or disable strict.

    Derick

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

    Derick Guest

  5. #5

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

    Hello,

    On Wed, Nov 26, 2003 at 05:32:29PM +0200, Andi Gutmans wrote: 

    Version 2.6.0 (the latest) of the Smarty template engine seems to go
    fine with php5. There is one new and rarely used feature in this
    version that relies on passing a function-parameter that has to be
    named "$this". But I'm sure this will be fixed in the near future.

    Older versions of Smarty create code that calls functions dynamically
    "$this->_plugins['function']['foo'][0](array(), $this)". This seems to
    break in php-5.

    greetings
    messju
     

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

    messju Guest

  6. #6

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


    function table creation works fine, but as it doesn't use any
    OO stuff at all it is not *that* astonishing ... ;)

    --
    Hartmut Holzgraefe <net>

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

    Hartmut Guest

  7. #7

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

    On Fri, Nov 28, 2003 at 10:04:39AM +0100, Derick Rethans wrote: 

    The "fixed" code can't run on PHP 4. This strict idea needs a minor
    reevaluation. Using var in PHP 5 isn't really "broken" and in order to
    run code that can run on both 4 and 5 users need to jump through hoops
    and, more importantly, disable the strict checking, which causes them to
    miss REAL deprication problems.

    --Dan

    --
    FREE scripts that make web and database programming easier
    http://www.ysisandsolutions.com/software/
    T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
    4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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

    Daniel Guest

  8. #8

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

    Andi Gutmans wrote: 

    Dunno if these are popular, but phpOpenTracker and XML_Transformer work
    fine.

    I had to change

    function &get($parameters) {
    include_once POT_INCLUDE_PATH . 'API.php';

    $api = &phpOpenTracker_API::getInstance();

    return $api->get($parameters);
    }

    to

    function &get($parameters) {
    include_once POT_INCLUDE_PATH . 'API.php';

    $api = &phpOpenTracker_API::getInstance();
    $result = $api->get($parameters);

    return $result;
    }

    but I think that this is a known problem.

    --
    Sebastian Bergmann
    http://sebastian-bergmann.de/ http://phpOpenTracker.de/

    Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/

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

    Sebastian Guest

  9. #9

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

    The strict was introduced so that we can add warnings about practices we
    recommend and deprecated behavior.
    I think "var" belongs there.
    We could remove E_STRICT from E_ALL (although that'd be a bit hacky) and
    save ppl the trouble of seeing these warnings.
    Then again, we could remove the warning about var but I'm not sure I'd want
    to do that.

    Andi

    At 12:22 PM 11/28/2003 -0500, Daniel Convissor wrote: 
    >
    >The "fixed" code can't run on PHP 4. This strict idea needs a minor
    >reevaluation. Using var in PHP 5 isn't really "broken" and in order to
    >run code that can run on both 4 and 5 users need to jump through hoops
    >and, more importantly, disable the strict checking, which causes them to
    >miss REAL deprication problems.
    >
    >--Dan
    >
    >--
    > FREE scripts that make web and database programming easier
    > http://www.ysisandsolutions.com/software/
    > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
    > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
    >
    >--
    >PHP Internals - PHP Runtime Development Mailing List
    >To unsubscribe, visit: http://www.php.net/unsub.php[/ref]

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

    Andi Guest

  10. #10

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

    > From: Andi Gutmans [mailto:com] 
     

    Well I would make E_ALL a subset of E_STRICT.
    This would be the cleanest for BC. Of course it might be confusing since
    "ALL" implies everything ..

    Regards,
    Lukas

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

    Lukas Guest

  11. #11

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

    Its a binary maths problem:

    #define E_ALL (E_ERROR | E_WARNING | E_P | E_NOTICE | E_CORE_ERROR |
    E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR |
    E_USER_WARNING | E_USER_NOTICE)

    I guess either slotting E_STRICT in the and defining E_ALL_PHP5 or
    (E_ALL_PHP4 and redefining E_ALL).. probably worth sticking in a few for
    future use... so the same problem doesnt occur again..???
    E_UNUSED_1
    E_UNUSED_2
    E_UNUSED_3
    E_UNUSED_4
    E_UNUSED_5

    Regards
    Alan

    Lukas Smith wrote:
     
    >
    >

    >
    >Well I would make E_ALL a subset of E_STRICT.
    >This would be the cleanest for BC. Of course it might be confusing since
    >"ALL" implies everything ..
    >
    >Regards,
    >Lukas
    >
    >
    >[/ref]

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

    Alan Guest

  12. #12

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

    On Mon, 1 Dec 2003, Andi Gutmans wrote:
     
    > >
    > >Again, turning off E_STRICT stops people from seeing major deprication
    > >issues. Declaring a class variable via "var" vs "public" is not a major
    > >deprication problem at this point in time.
    > >
    > >E_STRICT is creating a major problem. Pepole who provide classes for
    > >public consumption -- and there are a lot of us out here -- would be
    > >forced to maintain/distribute two branches of code: one using var for PHP
    > >4 users, one using strict for PHP 5 users.
    > >
    > >All I can say is "PLEASE don't make this scenario come true."[/ref]
    >
    > I don't quite understand the problem. E_STRICT was only meant for people
    > who really want to be pedantic. I think we can make it not part of E_ALL.
    > Is that OK?[/ref]

    SOunds good to me, -Wall with gcc doesn't show all errors either... I
    feel it's very close to this.

    Derick

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

    Derick Guest

  13. #13

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

    --Boundary-02=_xo8y/4aa8/nuL+R
    Content-Type: text/plain;
    cht="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline

    On Monday 01 December 2003 23:27, Derick Rethans wrote:
     [/ref]
    L. 
    >
    > SOunds good to me, -Wall with gcc doesn't show all errors either... I
    > feel it's very close to this.[/ref]

    If you're going to do this, then do it backwards compatible and 'leave' E_A=
    LL=20
    at 2047 and move E_STRICT to 2048.
    Many apache administrators will thank you for this ;)

    =2D-=20
    Melvyn

    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
    =3D=3D=3D=3D=3D
    =46reeBSD sarevok.webteckies.org 5.2-BETA FreeBSD 5.2-BETA #2: Mon Dec 1=20
    17:58:47 CET 2003 webteckies.org:/usr/obj/usr/src/sys/
    SAREVOK_NOFW_DBG i386
    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
    =3D=3D=3D=3D=3D

    --Boundary-02=_xo8y/4aa8/nuL+R
    Content-Type: application/pgp-signature
    Content-Description: signature

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.3 (FreeBSD)

    iD8DBQA/y8ox3yAApqL73WMRAgaNAJ9grenIm5ch+vi2LKbvkiU9MfNvAw Cggnj8
    Hi8ARCEvapl3q7rJ3rMBlJs=
    =M0p1
    -----END PGP SIGNATURE-----

    --Boundary-02=_xo8y/4aa8/nuL+R--
    Melvyn Guest

  14. #14

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

    The var issue is probably going to affect pear, I would presume the plan
    is to make all code 'pable' by E_STRICT, and yet most pear packages
    will retail PHP4 support for quite a while.

    I guess well have to start doing class { .... } :)

    Regards
    Alan

    Andi Gutmans wrote:
     
    >> people 
    >> E_ALL. 
    >>
    >> 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.
    >
    > Andi
    >[/ref]

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

    Alan Guest

  15. #15

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

    --- Melvyn Sopacua <nl> wrote: 

    I like the idea of leaving E_ALL at 2047, but it's also quite intuitive
    that E_ALL is the sum of all other error levels, and each of these are
    independent of one another.

    Having E_STRICT at 2048 would make it seem as if the errors returned from
    this level do not include any of the E_ALL error types. So, to really get
    everything, you would want 2047 + 2048 = 4095. But, I assume this is not
    what we want, or is it?

    Chris

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

    Chris Guest

  16. #16

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

    For the next 18-24 months, we are going to have to deal with code
    running in both PHP 4 and 5. Why not declare "var" an alias for
    "public", not throw E_STRICT for it and be done with it? If not this
    issue will be a real PITA for PEAR users.

    - Stig

    On Sun, 2003-11-30 at 00:10, Andi Gutmans wrote: 
    > >
    > >The "fixed" code can't run on PHP 4. This strict idea needs a minor
    > >reevaluation. Using var in PHP 5 isn't really "broken" and in order to
    > >run code that can run on both 4 and 5 users need to jump through hoops
    > >and, more importantly, disable the strict checking, which causes them to
    > >miss REAL deprication problems.
    > >
    > >--Dan
    > >
    > >--
    > > FREE scripts that make web and database programming easier
    > > http://www.ysisandsolutions.com/software/
    > > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
    > > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
    > >
    > >--
    > >PHP Internals - PHP Runtime Development Mailing List
    > >To unsubscribe, visit: http://www.php.net/unsub.php[/ref][/ref]

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

    Stig Guest

  17. #17

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

    On Tue, 2 Dec 2003, Melvyn Sopacua wrote:
     
    > >
    > > SOunds good to me, -Wall with gcc doesn't show all errors either... I
    > > feel it's very close to this.[/ref]
    >
    > If you're going to do this, then do it backwards compatible and 'leave' E_ALL
    > at 2047 and move E_STRICT to 2048.
    > Many apache administrators will thank you for this ;)[/ref]

    E_STRICT already is 2048... it's just that E_ALL shouldn't include it.

    Derick

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

    Derick Guest

  18. #18

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

    At 09:18 AM 12/2/2003 +0100, Derick Rethans wrote: [/ref]
    > people [/ref]
    > E_ALL. 
    > >
    > > If you're going to do this, then do it backwards compatible and 'leave'[/ref]
    > E_ALL 
    >
    >E_STRICT already is 2048... it's just that E_ALL shouldn't include it.[/ref]

    Done.

    Andi

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

    Andi Guest

  19. #19

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

    --Boundary-02=_SEGz/BoPhl4uYO9
    Content-Type: text/plain;
    cht="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline

    On Tuesday 02 December 2003 09:18, Derick Rethans wrote: 
    > >
    > > If you're going to do this, then do it backwards compatible and 'leave'
    > > E_ALL at 2047 and move E_STRICT to 2048.
    > > Many apache administrators will thank you for this ;)[/ref]
    >
    > E_STRICT already is 2048... it's just that E_ALL shouldn't include it.[/ref]

    Good - I was kinda afraid it would be some hack, that changed the value of=
    =20
    E_ALL regardless.
    How about E_PEDANTIC being E_ALL | E_STRICT? Sounds logical to me.
    =2D-=20
    Melvyn

    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
    =3D=3D=3D=3D=3D
    =46reeBSD sarevok.webteckies.org 5.2-BETA FreeBSD 5.2-BETA #2: Mon Dec 1=20
    17:58:47 CET 2003 webteckies.org:/usr/obj/usr/src/sys/
    SAREVOK_NOFW_DBG i386
    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
    =3D=3D=3D=3D=3D

    --Boundary-02=_SEGz/BoPhl4uYO9
    Content-Type: application/pgp-signature
    Content-Description: signature

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.3 (FreeBSD)

    iD8DBQA/zGES3yAApqL73WMRAkHWAKCkzIaLm8F9WB1BTfmkVmdGyQ5mqw CghA7W
    upywOSHAJTLOPd0oyxz5GZs=
    =3kTg
    -----END PGP SIGNATURE-----

    --Boundary-02=_SEGz/BoPhl4uYO9--
    Melvyn Guest

  20. #20

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

    Stig S. Bakken wrote: 

    +1 from me (not that my vote counts, but... :-))

    - Chris

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

    Christian Guest

Page 1 of 3 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