include_once() - always included?

This is a discussion on include_once() - always included? within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi All, Always looking for efficiency, consider the following code: <?php function one($arg){ if ($arg == 1){ include_once(...); do ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-15-2004
Aaron DeLoach
 
Posts: n/a
Default include_once() - always included?

Hi All,

Always looking for efficiency, consider the following code:

<?php
function one($arg){
if ($arg == 1){
include_once(...);
do some stuff...
}else{
do some stuff...
}
}
?>

If the above function is called with an argument value of '2', is the
'include_once' file included?

Regards,
Aaron




Reply With Quote
  #2 (permalink)  
Old 10-16-2004
Andy Hassall
 
Posts: n/a
Default Re: include_once() - always included?

On Fri, 15 Oct 2004 17:58:33 -0500, "Aaron DeLoach" <aaron@deloachcorp.com>
wrote:

>Always looking for efficiency, consider the following code:
>
><?php
>function one($arg){
> if ($arg == 1){
> include_once(...);
> do some stuff...
> }else{
> do some stuff...
> }
>}
>?>
>
>If the above function is called with an argument value of '2', is the
>'include_once' file included?


No. (What happened when you tried it?)

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Reply With Quote
  #3 (permalink)  
Old 10-19-2004
Harrie Verveer
 
Posts: n/a
Default Re: include_once() - always included?

ehrm no... please tell me this is a joke :P

Aaron DeLoach wrote:
> Hi All,
>
> Always looking for efficiency, consider the following code:
>
> <?php
> function one($arg){
> if ($arg == 1){
> include_once(...);
> do some stuff...
> }else{
> do some stuff...
> }
> }
> ?>
>
> If the above function is called with an argument value of '2', is the
> 'include_once' file included?
>
> Regards,
> Aaron
>
>
>
>

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:04 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0