Re: [PHP] Server Side Include translator as PHP functions

2011-10-11 Thread tamouse mailing lists
On Sat, Oct 8, 2011 at 10:36 AM, Complex complex.confus...@gmail.com wrote: Can you please tell me if there's already a set of PHP functions for translating SSI commands to PHP? I'm looking to do two things -- one difficult, one easy -- using PHP on a hosted server. I can't believe

Re: [PHP] Server Side Include translator as PHP functions

2011-10-11 Thread tamouse mailing lists
On Sun, Oct 9, 2011 at 12:36 PM, Tedd Sperling tedd.sperl...@gmail.com wrote: On Oct 9, 2011, at 11:41 AM, Complex wrote: Tedd, The crucial detail you're lookign for is my lack of choice or control in the matter, for all sorts of reasons that are actually quite stupid but not possible for

Re: [PHP] Server Side Include translator as PHP functions

2011-10-10 Thread Tedd Sperling
On Oct 9, 2011, at 7:43 PM, Tommy Pham wrote: On Sun, Oct 9, 2011 at 8:41 AM, Complex complex.confus...@gmail.com wrote: Tedd, The crucial detail you're lookign for is my lack of choice or control in the matter, for all sorts of reasons that are actually quite stupid but not possible for

Re: [PHP] Server Side Include translator as PHP functions

2011-10-10 Thread Complex
Ah, well, thanks for the job advice, guys. I'll go looking elsewhere for possible PHP solutions. Or, failing that, continue the build up to actually being able to replace all of this with a company-wide (and hopefully PHP-based) solution. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Server Side Include translator as PHP functions

2011-10-09 Thread Tedd Sperling
On Oct 8, 2011, at 8:48 PM, Tommy Pham wrote: On Sat, Oct 8, 2011 at 5:33 PM, Complex complex.confus...@gmail.com wrote: Thanks for the advice, I'm aware of all that, but I'm looking for a specific PHP solution at the moment. Unless you have advice on how I can update the SSI includes on the

Re: [PHP] Server Side Include translator as PHP functions

2011-10-09 Thread Complex
Tedd, The crucial detail you're lookign for is my lack of choice or control in the matter, for all sorts of reasons that are actually quite stupid but not possible for *me* to change, and not possible for anyone else to change quickly. Thus I am looking for a solution to the problem at hand,

Re: [PHP] Server Side Include translator as PHP functions

2011-10-09 Thread Complex
On Sat, Oct 8, 2011 at 8:48 PM, Tommy Pham tommy...@gmail.com wrote: On Sat, Oct 8, 2011 at 5:33 PM, Complex complex.confus...@gmail.com wrote: Thanks for the advice, I'm aware of all that, but I'm looking for a specific PHP solution at the moment. Unless you have advice on how I can update

Re: [PHP] Server Side Include translator as PHP functions

2011-10-09 Thread Tedd Sperling
On Oct 9, 2011, at 11:41 AM, Complex wrote: Tedd, The crucial detail you're lookign for is my lack of choice or control in the matter, for all sorts of reasons that are actually quite stupid but not possible for *me* to change, and not possible for anyone else to change quickly. Thus I am

Re: [PHP] Server Side Include translator as PHP functions

2011-10-09 Thread Tommy Pham
On Sun, Oct 9, 2011 at 8:41 AM, Complex complex.confus...@gmail.com wrote: Tedd, The crucial detail you're lookign for is my lack of choice or control in the matter, for all sorts of reasons that are actually quite stupid but not possible for *me* to change, and not possible for anyone else

[PHP] Server Side Include translator as PHP functions

2011-10-08 Thread Complex
Hello, Can you please tell me if there's already a set of PHP functions for translating SSI commands to PHP? I'm looking to do two things -- one difficult, one easy -- using PHP on a hosted server. My client has web pages that use Server Side Includes, and one sub-site that uses PHP. The task

Re: [PHP] Server Side Include translator as PHP functions

2011-10-08 Thread Tommy Pham
On Sat, Oct 8, 2011 at 8:36 AM, Complex complex.confus...@gmail.com wrote: Hello, Can you please tell me if there's already a set of PHP functions for translating SSI commands to PHP? I'm looking to do two things -- one difficult, one easy -- using PHP on a hosted server. My client has

Re: [PHP] Server Side Include translator as PHP functions

2011-10-08 Thread Tommy Pham
On Sat, Oct 8, 2011 at 8:36 AM, Complex complex.confus...@gmail.com wrote: Hello, Can you please tell me if there's already a set of PHP functions for translating SSI commands to PHP? I'm looking to do two things -- one difficult, one easy -- using PHP on a hosted server. My client has

Re: [PHP] Server Side Include translator as PHP functions

2011-10-08 Thread Tommy Pham
My apologies I was multitasking some heavy applications/tests and had a huge spike in CPUs utilization and I accidentally clicked on send x2.

Re: [PHP] Server Side Include translator as PHP functions

2011-10-08 Thread Complex
On Sat, Oct 8, 2011 at 1:09 PM, Tommy Pham tommy...@gmail.com wrote: I think you didn't provide enough details to get a more accurate suggestion of a solution, but here goes...  Is 'include SSI file B' always included and always need to be replaced?  If so, that's a very apparent solution.  If

Re: [PHP] Server Side Include translator as PHP functions

2011-10-08 Thread Tommy Pham
On Sat, Oct 8, 2011 at 2:31 PM, Complex complex.confus...@gmail.com wrote: On Sat, Oct 8, 2011 at 1:09 PM, Tommy Pham tommy...@gmail.com wrote: I think you didn't provide enough details to get a more accurate suggestion of a solution, but here goes... Is 'include SSI file B' always

Re: [PHP] Server Side Include translator as PHP functions

2011-10-08 Thread Complex
Thanks for the advice, I'm aware of all that, but I'm looking for a specific PHP solution at the moment. Unless you have advice on how I can update the SSI includes on the larger website *without* having to also update the PHP includes for this smaller website? I take it that you don't know of

Re: [PHP] Server Side Include translator as PHP functions

2011-10-08 Thread Complex
Oh, and on our servers you can't call PHP commands from SSI includes. I'm not certain if that's true from all servers, but it's certainly the case that on some servers the PHP runs first and then the server side commands. So !--#include virtual=/path/to/php/code2exec.php -- doesn't work. Gods I

Re: [PHP] Server Side Include translator as PHP functions

2011-10-08 Thread Tommy Pham
On Sat, Oct 8, 2011 at 5:33 PM, Complex complex.confus...@gmail.com wrote: Thanks for the advice, I'm aware of all that, but I'm looking for a specific PHP solution at the moment. Unless you have advice on how I can update the SSI includes on the larger website *without* having to also update

Re: [PHP] Functions/methods aliases in PHp 5.2

2011-05-16 Thread David Harkness
On Sun, May 15, 2011 at 3:15 PM, Richard Quadling rquadl...@gmail.comwrote: Personally, I would recommend using 1 naming convention and sticking with it. I wholeheartedly agree. Multiple method names is not flexibility--it's confusion and an open invitation for bugs. Plus, even with two

[PHP] Functions/methods aliases in PHp 5.2

2011-05-15 Thread Andre Polykanine
Hi everyone, Is there any possibility to make a method or function alias in PHP? Yes, I know I can do the following: ?php function foo_bar($x) { // And so we code... return $result; } function FooBar($x) { return foo_bar($x); } But maybe there is a more elegant solution? Thanks! -- With best

Re: [PHP] Functions/methods aliases in PHp 5.2

2011-05-15 Thread Richard Quadling
On 15 May 2011 21:45, Andre Polykanine an...@oire.org wrote: Hi everyone, Is there any possibility to make a method or function alias in PHP? Yes, I know I can do the following: ?php function foo_bar($x) { // And so we code... return $result; } function FooBar($x) { return foo_bar($x)

Re: [PHP] Functions/methods aliases in PHp 5.2

2011-05-15 Thread Andre Polykanine
Subject: [PHP] Functions/methods aliases in PHp 5.2 On 15 May 2011 21:45, Andre Polykanine an...@oire.org wrote: Hi everyone, Is there any possibility to make a method or function alias in PHP? Yes, I know I can do the following: ?php function foo_bar($x) { // And so we code... return

Re: [PHP] Functions/methods aliases in PHp 5.2

2011-05-15 Thread Richard Quadling
Quadling rquadl...@gmail.com To: Andre Polykanine Date created: , 12:48:30 AM Subject: [PHP] Functions/methods aliases in PHp 5.2      On 15 May 2011 21:45, Andre Polykanine an...@oire.org wrote: Hi everyone, Is there any possibility to make a method or function alias in PHP? Yes, I know I can

[PHP] File locking with PHP functions

2011-04-04 Thread Paul M Foster
I'd like to know (from someone who knows the internals more than I do) whether the following functions lock files and to what extent: fopen($filename, 'w'); Does this function lock the file from writes until fclose()? Does it lock from reads as well? fopen($filename, 'r+'); Does this function

Re: [PHP] File locking with PHP functions

2011-04-04 Thread Stuart Dallas
On Monday, 4 April 2011 at 15:28, Paul M Foster wrote: I'd like to know (from someone who knows the internals more than I do) whether the following functions lock files and to what extent: fopen($filename, 'w'); Does this function lock the file from writes until fclose()? Does it lock from

Re: [PHP] File locking with PHP functions

2011-04-04 Thread Louis Huppenbauer
It may not be a direct answer to your question, but... You could just use flock() to lock the file while accessing it. louis 2011/4/4 Paul M Foster pa...@quillandmouse.com: I'd like to know (from someone who knows the internals more than I do) whether the following functions lock files and to

Re: [PHP] functions and global variables

2010-07-19 Thread Shreyas Agasthya
My two cents on this one. Modify the $name within the function and print it. Modify the$name outside the function (means the non-global-declared $name) and print it. You will know the difference. --Shreyas On Mon, Jul 19, 2010 at 7:41 AM, Paul M Foster pa...@quillandmouse.comwrote: On Sun,

Re: [PHP] functions and global variables

2010-07-19 Thread Simcha Younger
On Mon, 19 Jul 2010 13:37:12 +0530 Shreyas Agasthya shreya...@gmail.com wrote: My two cents on this one. Modify the $name within the function and print it. Modify the$name outside the function (means the non-global-declared $name) and print it. You will know the difference.

[PHP] functions and global variables

2010-07-18 Thread David Mehler
Hello, I've got a file with a variable declared in it. For purposes of this post: $name = $_POST['name']; Now a little later in the same file I have a custom function call that outputs some information. In that information is an echo statement outputting $name: echo $name; I'm wondering do I

Re: [PHP] functions and global variables

2010-07-18 Thread Paul M Foster
On Sun, Jul 18, 2010 at 06:37:30PM -0400, David Mehler wrote: Hello, I've got a file with a variable declared in it. For purposes of this post: $name = $_POST['name']; Now a little later in the same file I have a custom function call that outputs some information. In that information is

[PHP] underscore in php functions?

2009-08-03 Thread Oral Timocin
Hi all, i am a newbie to php an want to learn it. Aftere reading some sample Code an the documetation i have an unanswered question! for example: public function _example(){ } what does the _ mean in that function. Could anyone help me? regards -- PHP General Mailing List

Re: [PHP] underscore in php functions?

2009-08-03 Thread Stuart
2009/8/3 Oral Timocin o_timo...@gmx.de: Hi all, i am a newbie to php an want to learn it. Aftere reading some sample Code an the documetation i have an unanswered question! for example: public function _example(){ } what does the _ mean in that function. Could anyone help me?

Re: [PHP] underscore in php functions?

2009-08-03 Thread Oral Timocin
Stuart wrote: 2009/8/3 Oral Timocin o_timo...@gmx.de: Hi all, i am a newbie to php an want to learn it. Aftere reading some sample Code an the documetation i have an unanswered question! for example: public function _example(){ } what does the _ mean in that function. Could anyone

Re: [PHP] underscore in php functions?

2009-08-03 Thread Ashley Sheridan
On Mon, 2009-08-03 at 22:46 +0200, Oral Timocin wrote: Stuart wrote: 2009/8/3 Oral Timocin o_timo...@gmx.de: Hi all, i am a newbie to php an want to learn it. Aftere reading some sample Code an the documetation i have an unanswered question! for example: public function

Re: [PHP] Two very useful PHP functions

2009-05-01 Thread Darren
regards __ Raymond Irving --- On Thu, 4/30/09, Daniel Brown danbr...@php.net wrote: From: Daniel Brown danbr...@php.net Subject: Re: [PHP] Two very useful PHP functions To: Raymond Irving xwis...@yahoo.com Cc: php-general@lists.php.net Date: Thursday, April 30, 2009, 11:37 AM On Wed

Re: [PHP] Two very useful PHP functions

2009-05-01 Thread Andrew Ballard
On Fri, May 1, 2009 at 4:05 AM, Darren dar...@sirdaz.com wrote: This was discussed for PHP6, but eventually decided not to have such a function. Instead, we now have the following:    $var = $_GET['var'] ?: 5; Taken from http://www.corephp.co.uk/archives/19-Prepare-for-PHP-6.html 'you'd be

[PHP] Re: Two very useful PHP functions

2009-04-30 Thread Colin Guthrie
'Twas brillig, and Raymond Irving at 30/04/09 03:32 did gyre and gimble: Hello, Every so often I have to be using the isset() function to check if a variable exists. It would be useful to have something like an ifset() function Instead of doing this $v = isset($input) ? $input : $default;

Re: [PHP] Two very useful PHP functions

2009-04-30 Thread Daniel Brown
On Wed, Apr 29, 2009 at 22:32, Raymond Irving xwis...@yahoo.com wrote: What do you think? Can they make it into 5.3? Not when doing the ternary operator that you even displayed yourself takes up less code and time than a core function would. It's a good idea, but better handled on the

Re: [PHP] Two very useful PHP functions

2009-04-30 Thread Raymond Irving
: Daniel Brown danbr...@php.net Subject: Re: [PHP] Two very useful PHP functions To: Raymond Irving xwis...@yahoo.com Cc: php-general@lists.php.net Date: Thursday, April 30, 2009, 11:37 AM On Wed, Apr 29, 2009 at 22:32, Raymond Irving xwis...@yahoo.com wrote: What do you think? Can

[PHP] Two very useful PHP functions

2009-04-29 Thread Raymond Irving
Hello, Every so often I have to be using the isset() function to check if a variable exists. It would be useful to have something like an ifset() function Instead of doing this $v = isset($input) ? $input : $default; we can do this $v = ifset($input,$default); // returns $input if it exists

Re: [PHP] Common PHP functions benchmarks

2008-04-12 Thread Nathan Nobbe
On Tue, Apr 8, 2008 at 4:00 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: i did some tests a couple of months ago; pitting array iteration vs. iteration w/ spl iterators. link is down atm; but will be back soon and ill post again so you have something similar to look at. a quick glance shows

Re: [PHP] Common PHP functions benchmarks

2008-04-11 Thread Larry Garfield
I did some similar micro-benchmarking a while back, too: http://www.garfieldtech.com/blog/magic-benchmarks On Tuesday 08 April 2008, Jason Knight wrote: I've been running some benchmarks on popular PHP functions. I would like to get some input on them from the community. So far I have run

[PHP] Re: Common PHP functions benchmarks

2008-04-10 Thread Jason Knight
Does nobody have any other input? On Tue, Apr 8, 2008 at 12:52 PM, Jason Knight [EMAIL PROTECTED] wrote: I've been running some benchmarks on popular PHP functions. I would like to get some input on them from the community. So far I have run tests on Arrays and PHP5's SPL ArrayObject

[PHP] Common PHP functions benchmarks

2008-04-08 Thread Jason Knight
I've been running some benchmarks on popular PHP functions. I would like to get some input on them from the community. So far I have run tests on Arrays and PHP5's SPL ArrayObject, as well as loops and some networking functions. Here is a link to the code used for the benchmarks. http

Re: [PHP] Common PHP functions benchmarks

2008-04-08 Thread Nathan Nobbe
On Tue, Apr 8, 2008 at 1:52 PM, Jason Knight [EMAIL PROTECTED] wrote: I've been running some benchmarks on popular PHP functions. I would like to get some input on them from the community. So far I have run tests on Arrays and PHP5's SPL ArrayObject, as well as loops and some networking

[PHP] Functions not available when run as Scheduled Task?

2008-02-27 Thread Brian Dunning
Don't laugh but we have a Win 2003 Server set up with WAMP, and the PHP/MySQL scripts work great. I set one up to run as a scheduled task: C:\php5\php.exe D:\wamp\www\scriptname.php ...but nothing happens and the Scheduled Tasks log says that it exited with an (ff). So I entered the above

Re: [PHP] Functions not available when run as Scheduled Task?

2008-02-27 Thread Ray Hauge
Brian Dunning wrote: Don't laugh but we have a Win 2003 Server set up with WAMP, and the PHP/MySQL scripts work great. I set one up to run as a scheduled task: C:\php5\php.exe D:\wamp\www\scriptname.php ...but nothing happens and the Scheduled Tasks log says that it exited with an (ff). So I

Re: [PHP] Functions not available when run as Scheduled Task?

2008-02-27 Thread Daniel Brown
On Wed, Feb 27, 2008 at 6:37 PM, Brian Dunning [EMAIL PROTECTED] wrote: Don't laugh but we have a Win 2003 Server set up with WAMP, and the PHP/MySQL scripts work great. I set one up to run as a scheduled task: C:\php5\php.exe D:\wamp\www\scriptname.php ...but nothing happens and the

RE: [PHP] Functions not available when run as Scheduled Task?

2008-02-27 Thread Andrés Robinet
-Original Message- From: Ray Hauge [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 6:42 PM To: Brian Dunning Cc: php-general@lists.php.net Subject: Re: [PHP] Functions not available when run as Scheduled Task? Brian Dunning wrote: Don't laugh but we have a Win 2003

Re: [PHP] Functions not available when run as Scheduled Task?

2008-02-27 Thread Jochem Maas
Brian Dunning schreef: Don't laugh but we have a Win 2003 Server set up with WAMP, and the PHP/MySQL scripts work great. I set one up to run as a scheduled task: C:\php5\php.exe D:\wamp\www\scriptname.php ...but nothing happens and the Scheduled Tasks log says that it exited with an (ff). So

Re: [PHP] Functions not available when run as Scheduled Task?

2008-02-27 Thread Brian Dunning
Adding this command solved it. Thanks to everyone! I did not even know this command existed. On Feb 27, 2008, at 3:46 PM, Andrés Robinet wrote: Use the -c command line option to be sure, for example: C:\php5\php.exe -c C:\php5\php.ini -f D:\wamp\www\scriptname.php -- -- PHP General

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Thijs Lensselink
Jason Pruim wrote: Hi everyone :) So partly to get an answer, and partly to boost my post rankings for the week I have a question. I am attempting to write an authentication function which would query a database, check the username/password and return true if it matches. If it doesn't

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Jim Lucas
Jason Pruim wrote: Hi everyone :) So partly to get an answer, and partly to boost my post rankings for the week I have a question. I am attempting to write an authentication function which would query a database, check the username/password and return true if it matches. If it doesn't

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Nathan Nobbe
On Jan 25, 2008 3:35 PM, Thijs Lensselink [EMAIL PROTECTED] wrote: Change: }return $authenticated; to return $authenticated; } else it will never return the value from the function. But it will always give you undefined variable notice nice catch ;) -nathan

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Richard Lynch
On Fri, January 25, 2008 1:59 pm, Jason Pruim wrote: Hi everyone :) So partly to get an answer, and partly to boost my post rankings for the week I have a question. I am attempting to write an authentication function which would query a database, check the username/password and return

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Nathan Nobbe
?PHP /// initialize the return variable $authenticated = false; function authentication(){ if(!isset($user) || !isset($pass)) { return false; } /// -- i would do it a bit nicer than this, but you get the idea if($user $pass) { // Keep in mind, PASSWORD has

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Thijs Lensselink
Nathan Nobbe wrote: On Jan 25, 2008 3:35 PM, Thijs Lensselink [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Change: }return $authenticated; to return $authenticated; } else it will never return the value from the function. But it will always give you

[PHP] Functions are driving me crazy....

2008-01-25 Thread Jason Pruim
Hi everyone :) So partly to get an answer, and partly to boost my post rankings for the week I have a question. I am attempting to write an authentication function which would query a database, check the username/password and return true if it matches. If it doesn't match, then it

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Nathan Nobbe
oh; i just noticed you dont have formal parameters for $user or $pass; so, function authentication($user, $pass) { /// ... then you can remove the first line i put in there on the last post :) } -nathan

[PHP] Functions with Static Variables vs. Classes

2007-11-29 Thread news_yodpeirs
For some simple applications I use a function to collect values in a static variable and to return them when called in a special way, just like this (fairly senseless) example: function example($elem='') { static $store = array(); if (!func_num_args()) return($store); ... do

Re: [PHP] Functions with Static Variables vs. Classes

2007-11-29 Thread Zoltán Németh
2007. 11. 29, csütörtök keltezéssel 14.18-kor [EMAIL PROTECTED] ezt írta: For some simple applications I use a function to collect values in a static variable and to return them when called in a special way, just like this (fairly senseless) example: function example($elem='') { static

Re: [PHP] Functions with Static Variables vs. Classes

2007-11-29 Thread news_yodpeirs
From: Zoltán Németh [EMAIL PROTECTED] function example($elem='') { static $store = array(); AFAIK the above line should cause an error on the second run of the function, as you declare the same static variable for the second time. or am I wrong? I think so - otherwise static

Re: [PHP] Functions with Static Variables vs. Classes

2007-11-29 Thread Jochem Maas
[EMAIL PROTECTED] wrote: From: Zoltán Németh [EMAIL PROTECTED] function example($elem='') { static $store = array(); AFAIK the above line should cause an error on the second run of the function, as you declare the same static variable for the second time. or am I wrong? indeed you

[PHP] question regarding type hinting parameters of php functions

2007-11-26 Thread Dirk Thomas / 4wd media
Hi, i have tried a current snapshot of PHP 5.3 and have a question regarding type hinting. For example when using the function array_slice(array $array, int $offset, int $length) with a non-integer length parameter, what is the desired behavior? When calling array_slice($array, 0,

Re: [PHP] question regarding type hinting parameters of php functions

2007-11-26 Thread T . Lensselink
On Mon, 26 Nov 2007 10:29:40 +0100, Dirk Thomas / 4wd media [EMAIL PROTECTED] wrote: Hi, i have tried a current snapshot of PHP 5.3 and have a question regarding type hinting. For example when using the function array_slice(array $array, int $offset, int $length) with a non-integer

[PHP] functions versus includes

2007-11-11 Thread Frank Lopes
I just started using PHP and got to think... Without getting into the discussion of best practices, strictly from a performance perspective, what is faster: a function or an include? For example I have a block of text that needs to appear mutliple times throughout the site. Will I be

Re: [PHP] functions versus includes

2007-11-11 Thread Chris
Frank Lopes wrote: I just started using PHP and got to think... Without getting into the discussion of best practices, strictly from a performance perspective, what is faster: a function or an include? For example I have a block of text that needs to appear mutliple times throughout the

Re: [PHP] functions versus includes

2007-11-11 Thread Robert Cummings
On Mon, 2007-11-12 at 11:27 +1100, Chris wrote: Frank Lopes wrote: I just started using PHP and got to think... Without getting into the discussion of best practices, strictly from a performance perspective, what is faster: a function or an include? For example I have a block of

Re: [PHP] functions versus includes

2007-11-11 Thread Nathan Nobbe
On Nov 11, 2007 9:32 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Mon, 2007-11-12 at 11:27 +1100, Chris wrote: Frank Lopes wrote: I just started using PHP and got to think... Without getting into the discussion of best practices, strictly from a performance perspective, what

Re: [PHP] functions versus includes

2007-11-11 Thread Chris
Nathan Nobbe wrote: On Nov 11, 2007 9:32 PM, Robert Cummings [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: On Mon, 2007-11-12 at 11:27 +1100, Chris wrote: Frank Lopes wrote: I just started using PHP and got to think... Without getting into the discussion

Re: [PHP] functions versus includes

2007-11-11 Thread Nathan Nobbe
On Nov 11, 2007 11:52 PM, Chris [EMAIL PROTECTED] wrote: As I said, it's a micro-optimization *shrug*. 0.0004 seconds difference over 10 iterations - wow ;) actually it was just one iteration; the output isnt very clear, but thats the value of a variable. anyway, i was surprised to see the

Re: [PHP] functions versus includes

2007-11-11 Thread Chris
Nathan Nobbe wrote: On Nov 11, 2007 11:52 PM, Chris [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: As I said, it's a micro-optimization *shrug*. 0.0004 seconds difference over 10 iterations - wow ;) actually it was just one iteration; the output isnt very clear, but thats the

Re: [PHP] functions for sorting/paging functionality for imap mailboxes

2007-07-02 Thread Greg Donald
On 6/25/07, Yashesh Bhatia [EMAIL PROTECTED] wrote: i'm implementing an imap based mail client That's a major wheel to go reinventing, have you not tried IMP/Horde? http://www.horde.org/imp/ -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To

[PHP] functions for sorting/paging functionality for imap mailboxes

2007-06-25 Thread Yashesh Bhatia
hello, i'm implementing an imap based mail client and want to provide sorting / paging functionality for the inbox. there's a function to retrieve headers imap_headers (http://www.php.net/imap_headers) however, this gets headers for all messages in a mailbox(inbox). is there any function that

Re: [PHP] Reuse PHP functions in a third-party application

2007-03-23 Thread Richard Lynch
On Wed, March 21, 2007 3:34 am, Robert Enyedi wrote: Thanks for the info. Under these circumstances I suppose that the CGI calling mode is the best suited. On the other hand this option might raise some performance penalty. I wonder if better performance could be achieved if I would use a

Re: [PHP] Reuse PHP functions in a third-party application

2007-03-21 Thread Robert Enyedi
Richard, Thanks for the info. Under these circumstances I suppose that the CGI calling mode is the best suited. On the other hand this option might raise some performance penalty. I wonder if better performance could be achieved if I would use a socket based call interface to my module

[PHP] Re: Reuse PHP functions in a third-party application

2007-03-21 Thread Mikey
Robert Enyedi wrote: I'm not very familiar with the internal architecture of the Zend PHP engine nor with the PHP module mechanism, but can you reuse compiled PHP modules in other applications? Is there a way of calling the functions of a compiled module from a third party C application?

[PHP] Reuse PHP functions in a third-party application

2007-03-20 Thread Robert Enyedi
I'm not very familiar with the internal architecture of the Zend PHP engine nor with the PHP module mechanism, but can you reuse compiled PHP modules in other applications? Is there a way of calling the functions of a compiled module from a third party C application? Thanks, Robert -- PHP

Re: [PHP] Reuse PHP functions in a third-party application

2007-03-20 Thread Tijnema !
On 3/20/07, Robert Enyedi [EMAIL PROTECTED] wrote: I'm not very familiar with the internal architecture of the Zend PHP engine nor with the PHP module mechanism, but can you reuse compiled PHP modules in other applications? Is there a way of calling the functions of a compiled module from a

Re: [PHP] Reuse PHP functions in a third-party application

2007-03-20 Thread Richard Lynch
On Tue, March 20, 2007 5:27 am, Robert Enyedi wrote: I'm not very familiar with the internal architecture of the Zend PHP engine nor with the PHP module mechanism, but can you reuse compiled PHP modules in other applications? Is there a way of calling the functions of a compiled module from

[PHP] PHP Functions as XML or DB

2007-01-21 Thread WeberSites LTD
Hi I'm looking to create a Table that holds all of the PHP Functions, their description and syntax. It's all in the manual and I'm trying to extract it from there but I find it hard since the HTML template is not the same for all the functions. I may be going about this the wrong way

Re: [PHP] PHP Functions as XML or DB

2007-01-21 Thread Sergiu Voicu
with it. sergiu WeberSites LTD wrote: Hi I'm looking to create a Table that holds all of the PHP Functions, their description and syntax. It's all in the manual and I'm trying to extract it from there but I find it hard since the HTML template is not the same for all the functions. I may be going

Re: [PHP] PHP Functions as XML or DB

2007-01-21 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-21 17:04:43 +0200: I'm looking to create a Table that holds all of the PHP Functions, their description and syntax. It's all in the manual and I'm trying to extract it from there but I find it hard since the HTML template is not the same for all the functions

[PHP] Re: Organizing php functions

2006-09-03 Thread Ivo F.A.C. Fokkema
On Fri, 01 Sep 2006 21:35:32 -0600, The Doctor wrote: The question comes up because: Sort file in the path interfere with one another which leads to web page malfunction. Question: should all php programmes such as drupal be placed under /usr/local/lib ? I'm not getting the 'sort

[PHP] Functions vs html outpuit

2006-09-01 Thread Dave Goodchild
Hi all, this may seem like a silly question, but I am creating a library of html form element generation function, for example a textarea fucntion that takes rows and cols as parameters, a function that generates a day, month and year select box, etc. My question is - is it significantly to

[PHP] Organizing php functions

2006-09-01 Thread The Doctor
The question comes up because: Sort file in the path interfere with one another which leads to web page malfunction. Question: should all php programmes such as drupal be placed under /usr/local/lib ? -- Member - Liberal International This is [EMAIL PROTECTED] Ici [EMAIL PROTECTED]

Re: [PHP] functions classes

2006-08-26 Thread Alex Turner
Larry, I have hit similar global names space issues in the past and it is a pain in the behind! One remedial method that can get it stable enough to start to work on is to stick the whole messy lot into classes (NOT OBJECTS!) and then the global name space becomes the local namespace (ie

[PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Alex Turner
I don't know what I was on when I wrote the previous post! In php you cannot create static class variables in this way (doh) or at least I never have managed. So when faced the this problem I replace what in C++ would be a class variable with a class function comme ca: class MyClass {

Re: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Robert Cummings
On Sat, 2006-08-26 at 12:49 +0100, Alex Turner wrote: I don't know what I was on when I wrote the previous post! In php you cannot create static class variables in this way (doh) or at least I never have managed. So when faced the this problem I replace what in C++ would be a class

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Robert Cummings
On Sat, 2006-08-26 at 16:51 +0100, Alex Turner wrote: Rob, I'd go along with the setting a var to null issue (in the cases I have worked so far on, there has not been a need to set variables to null). Maybe so, but if a variable ever happens to contain null and you're not aware of it, the

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Alex Turner
Cummings [mailto:[EMAIL PROTECTED] Sent: 26 August 2006 17:25 To: Alex Turner Cc: php-general@lists.php.net Subject: RE: [PHP] Brain Death - [PHP] functions classes On Sat, 2006-08-26 at 16:51 +0100, Alex Turner wrote: Rob, I'd go along with the setting a var to null issue (in the cases I have

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Alex Turner
Subject: Re: [PHP] Brain Death - [PHP] functions classes On Sat, 2006-08-26 at 12:49 +0100, Alex Turner wrote: I don't know what I was on when I wrote the previous post! In php you cannot create static class variables in this way (doh) or at least I never have managed. So when faced

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread tedd
At 4:51 PM +0100 8/26/06, Alex Turner wrote: And to be very pedantic - as null does not have a type then actually 'x === null' should evaluate to absurdity, but PHP is more pragmatic than that ;-) That's a very good point. While one NULL variable in php can be compared to another NULL

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Robert Cummings
On Sat, 2006-08-26 at 12:41 -0400, tedd wrote: At 4:51 PM +0100 8/26/06, Alex Turner wrote: And to be very pedantic - as null does not have a type then actually 'x === null' should evaluate to absurdity, but PHP is more pragmatic than that ;-) That's a very good point. While one NULL

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread tedd
At 2:30 PM -0400 8/26/06, Robert Cummings wrote: On Sat, 2006-08-26 at 12:41 -0400, tedd wrote: At 4:51 PM +0100 8/26/06, Alex Turner wrote: And to be very pedantic - as null does not have a type then actually 'x === null' should evaluate to absurdity, but PHP is more pragmatic than

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Robert Cummings
On Sat, 2006-08-26 at 14:23 -0400, tedd wrote: At 2:30 PM -0400 8/26/06, Robert Cummings wrote: On Sat, 2006-08-26 at 12:41 -0400, tedd wrote: At 4:51 PM +0100 8/26/06, Alex Turner wrote: And to be very pedantic - as null does not have a type then actually 'x === null' should evaluate

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Alex Turner
August 2006 19:24 To: Robert Cummings; tedd Cc: Alex Turner; php-general@lists.php.net Subject: RE: [PHP] Brain Death - [PHP] functions classes At 2:30 PM -0400 8/26/06, Robert Cummings wrote: On Sat, 2006-08-26 at 12:41 -0400, tedd wrote: At 4:51 PM +0100 8/26/06, Alex Turner wrote

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Robert Cummings
On Sat, 2006-08-26 at 15:38 -0400, tedd wrote: At 3:04 PM -0400 8/26/06, Robert Cummings wrote: On Sat, 2006-08-26 at 14:23 -0400, tedd wrote: Besides, what Alex Turner said about NULL is correct -- it's absurd to have NULL evaluate to anything. Just because one language allows

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread tedd
At 3:04 PM -0400 8/26/06, Robert Cummings wrote: On Sat, 2006-08-26 at 14:23 -0400, tedd wrote: Besides, what Alex Turner said about NULL is correct -- it's absurd to have NULL evaluate to anything. Just because one language allows absurdity doesn't mean you have to practice it. One

[PHP] functions classes

2006-08-25 Thread Bigmark
Can anyone tell me if it is relatively an easy process for an experienced coder (not me) to convert a php script to mainly functions/classes. I have my own script that i would like to make more streamlined as it is becoming very difficult to work with. -- PHP General Mailing List

  1   2   3   >