Re: PHP and #if

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14 Mar 2008, at 19:03, Eric Gorr wrote:
Unfortunately, such things cannot be used to wrap functions.

Erm, yes they can. Try it.

<?php
    if (rand(0,1) == 0)
    {
        function arse()
        {
            echo "arse 1\n";
        }
    }
    else
    {
        function arse()
        {
            echo "arse 2\n";
        }
    }

    arse();
?>

Oh, and top-posting is evil, please don't do it.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux