Re: is this a bug?

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

 



On 8/20/07, aflavio <aflavio@xxxxxxxxxxxxxxxxx> wrote:
>
> Strange..
>
> I'm return a include..

Not exactly... you're returning the return value of an include.

Take this:
var.php:
<?php
return "bar";
?>
foo.php
<?php
function include_bar() {
return include "bar.php"
}
echo include_bar(); // echoes bar

>
> the file will be included in the scope of the class? Because this i cant use the variables declared in the file ? all declared in the file only can be access from the method that i use to include the class file.
>
> example:
>
<snip some code>
>
>
> Am i right?
>
> thanks
>
> ps.: Sorry by the english.
>
> Augusto Morais
>
Well, you're quite close, but you expect something different from the
return... Like I said above.

Tijnema

ps. I don't really care about your english, but top posting is
annoying. Read the site in my signature to know why. Also snipping
irrelevant parts of the original message is important.

pps. Make sure you use the "Reply to all" button when making a reply
to the list, as for now, I was the only one who got your message. If
you don't have a "Reply to all" button, make sure you put the php list
in the to or cc address.

-- 
If this is a mailing list: DO NOT TOP POST! why?:
http://www.caliburn.nl/topposting.html

Vote for PHP Color Coding (aka Syntax Highlighting) in Gmail! ->
http://gpcc.tijnema.info

-- 
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