hello, other interesting articles to give a bird's eye view of new
features for php5
http://www.onlamp.com/pub/a/php/2004/07/15/UpgradePHP5.html
http://devzone.zend.com/node/view/id/1714
http://www.devshed.com/c/a/PHP/Whats-New-in-PHP-5/
hth.
yashesh bhatia.
On 6/26/07, Preethi [EMAIL
?php
class money
{
LOL, a penny saved is a penny earned
--
Regards,
Clive.
Real Time Travel Connections
{No electrons were harmed in the creation, transmission or reading of
this email. However, many were excited and some may well have enjoyed
the experience.}
--
PHP General
Robert Cummings wrote:
On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
I think I have to answer to this one: 'If at first you don't succeed try,
try again'.
Here's another one...
?php
$x = rand( 1, 20 );
for( $i = 0; $i $x; $i++ );
while( --$i 0 );
?
Colin Guthrie wrote:
Daniel Brown wrote:
What the hell? Why not start a thread that can be fun and
challenging for all of us. It's something I haven't seen done
Here's another quickie: Dead simple one!
?php
function x($x)
{
switch ($x)
{
case 1: return 'bitten';
case 2:
Hi,
Colin Guthrie wrote:
Daniel Brown wrote:
What the hell? Why not start a thread that can be fun and
challenging for all of us. It's something I haven't seen done
Here's another quickie: Dead simple one!
?php
function x($x)
{
switch ($x)
{
case 1:
David Restall - System Administrator wrote:
Hi,
Colin Guthrie wrote:
Daniel Brown wrote:
What the hell? Why not start a thread that can be fun and
challenging for all of us. It's something I haven't seen done
Here's another quickie: Dead simple one!
?php
function x($x)
{
switch
Stut wrote:
Surely this should be...
function x()
{
static $count = 0;
$count++;
switch ($count)
{
case 1: return 'bitten';
case 2: return 'shy';
}
return '';
}
:p
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Daniel Brown wrote:
What the hell? Why not start a thread that can be fun and
... here's a easy one:
interface Currency {}
interface Employee {}
class Peanut implements Currency {}
class Primate implements Employee {}
abstract class HeadHunter {
static function match(Currency $c) {
Hey all!
Was looking at trying some stuff with php and p oker (texas hold'em).
After searching the net for some clues as to how i can do this, i came accross
the class on the php classes site (but that codes to bruteforce-ish) so
continued looking and came accross some valuable suggestions on
Hello,
I have the following installed on a Redhat ES4 system:
curl 7.12.1 (i686-redhat-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.7a
zlib/1.2.1.2 libidn/0.5.6
Protocols: ftp gopher telnet dict ldap http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
Server version:
So you expect PHP ppl to do your job and test a JAVA class to tell u
if it's worth porting it to php?
Nice thoughts...
Andy
Ryan A wrote:
Hey all!
Was looking at trying some stuff with php and p oker (texas hold'em).
After searching the net for some clues as to how i can do
On 6/27/07, Ryan A [EMAIL PROTECTED] wrote:
Hey all!
Was looking at trying some stuff with php and p oker (texas hold'em).
After searching the net for some clues as to how i can do this, i came accross the class
on the php classes site (but that codes to bruteforce-ish) so continued looking
Hello all!
I was wondering if there is some kind of extension available that does
the same as PHP-GTK, Winbinder, etc. but not for the CLI but for the
web? Something that will look like EyeOS [1].
Tijnema
[1] http://demo.eyeos.org/
--
Vote for PHP Color Coding in Gmail! -
Tijnema wrote:
Hello all!
I was wondering if there is some kind of extension available that does
the same as PHP-GTK, Winbinder, etc. but not for the CLI but for the
web? Something that will look like EyeOS [1].
EyeOS is php.
Tijnema
[1] http://demo.eyeos.org/
--
PHP General
On 6/27/07, Jochem Maas [EMAIL PROTECTED] wrote:
Tijnema wrote:
Hello all!
I was wondering if there is some kind of extension available that does
the same as PHP-GTK, Winbinder, etc. but not for the CLI but for the
web? Something that will look like EyeOS [1].
Tijnema
[1]
Hey all!
So you expect PHP ppl to do your job and test a JAVA class to tell u
if it's worth porting it to php?
Nice thoughts...
Andy... why be a moron?
I just wanted someone with java knowledge to have a look at the code and see if
it ran properly.. something that should take an experienced
Tijnema wrote:
On 6/27/07, Jochem Maas [EMAIL PROTECTED] wrote:
Tijnema wrote:
Hello all!
I was wondering if there is some kind of extension available that does
the same as PHP-GTK, Winbinder, etc. but not for the CLI but for the
web? Something that will look like EyeOS [1].
hello,
i wrote a small RSS reader using file_get_contents to get the XML from
the URI - however i noticed that this does not leave trace (User Agent)
in the remote server logs.
is there a way in PHP to get XML from URI and leave UA trace in the
remote server logs?
thanks,
iv
--
PHP
On 6/27/07, Ryan A [EMAIL PROTECTED] wrote:
...
Tijnema, thanks for giving it a go...
Sorry it didnt compile,with my limited (and old) rusty knowledge of java 1.1 i
couldnt make out too much and i dont have any java server to run this on to
check it.
I pretty much left Java years back once i
On 6/27/07, Jochem Maas [EMAIL PROTECTED] wrote:
Tijnema wrote:
On 6/27/07, Jochem Maas [EMAIL PROTECTED] wrote:
Tijnema wrote:
Hello all!
I was wondering if there is some kind of extension available that does
the same as PHP-GTK, Winbinder, etc. but not for the CLI but for the
web?
On Wed, 2007-06-27 at 14:17 +0200, Tijnema wrote:
Not too hard to program right?
As long as you keep on assuming that you are playing with infinite decks
of cards, and not marking cards as dealt as you deal.
--Paul
All Email originating from UWC is covered by disclaimer
On 6/27/07, Paul Scott [EMAIL PROTECTED] wrote:
On Wed, 2007-06-27 at 14:17 +0200, Tijnema wrote:
Not too hard to program right?
As long as you keep on assuming that you are playing with infinite decks
of cards, and not marking cards as dealt as you deal.
--Paul
Hmm, good point I just
Paul Scott [EMAIL PROTECTED] wrote:
On Wed, 2007-06-27 at 14:17 +0200, Tijnema wrote:
Not too hard to program right?
As long as you keep on assuming that you are playing with infinite decks
of cards, and not marking cards as dealt as you deal.
--Paul
Hey Paul,
Actually, I have already
[EMAIL PROTECTED] wrote:
hello,
i wrote a small RSS reader using file_get_contents to get the XML from
the URI - however i noticed that this does not leave trace (User Agent)
in the remote server logs.
is there a way in PHP to get XML from URI and leave UA trace in the
remote server logs?
Tijnema [EMAIL PROTECTED] wrote: Well, I find this a very interesting thing
;)
I have played quite a lot poker, and I still play it sometimes, and
this doesn't seems too hard for me :)
My approach would be this:
1) Deal cards, rand(1,13) for the numbers(1- Ace, 11-Jack,
12-Queen, 13-King), and
On Wed, 2007-06-27 at 09:26 +0100, Colin Guthrie wrote:
Robert Cummings wrote:
On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
I think I have to answer to this one: 'If at first you don't succeed try,
try again'.
Here's another one...
?php
$x = rand( 1,
On Wed, 2007-06-27 at 16:33 +0530, Gowranga wrote:
Hello,
I have the following installed on a Redhat ES4 system:
curl 7.12.1 (i686-redhat-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.7a
zlib/1.2.1.2 libidn/0.5.6
Protocols: ftp gopher telnet dict ldap http file https ftps
Features: GSS-Negotiate
On Wed, 2007-06-27 at 10:10 +0100, David Restall - System Administrator
wrote:
Probably a more accurate solution would be :-
function x()
{
static $count = 0;
$count++;
switch ($count % 3)
{
case 0:
case 2: return 'shy';
case
On 6/27/07, Stephen [EMAIL PROTECTED] wrote:
Tijnema [EMAIL PROTECTED] wrote:
Well, I find this a very interesting thing ;)
I have played quite a lot poker, and I still play it sometimes, and
this doesn't seems too hard for me :)
My approach would be this:
1) Deal cards, rand(1,13) for the
Daniel Brown wrote:
What the hell? Why not start a thread that can be fun and
challenging for all of us. It's something I haven't seen done
anywhere else yet, but I wouldn't be surprised if it has been. Let's
put together some names, phrases, and other stuff expressed as PHP
code and
On Wed, 2007-06-27 at 14:33 +0100, Colin Guthrie wrote:
Daniel Brown wrote:
What the hell? Why not start a thread that can be fun and
challenging for all of us. It's something I haven't seen done
anywhere else yet, but I wouldn't be surprised if it has been. Let's
put together some
[snip]
I like this one:
?php
for ($i = an; $i==an; );
?
[/snip]
Wow, that is a stumper. Here is another, should be quite simple;
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($x);
}
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
On Wednesday 27 June 2007 06:32, Edward Vermillion wrote:
Most /tmp directories are world rwx. So anyone that can log into the
server through a shell, or any account running on the server, has at
least read access to anything in the /tmp directory. They wouldn't
need to do it through a web
[snip]
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($x);
}
?
[/snip]
Ooops, typo;
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($i);
}
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Wed, 2007-06-27 at 09:21 -0500, Jay Blanchard wrote:
[snip]
I like this one:
?php
for ($i = an; $i==an; );
?
[/snip]
Wow, that is a stumper. Here is another, should be quite simple;
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($x);
}
On Wed, 2007-06-27 at 09:25 -0500, Jay Blanchard wrote:
[snip]
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($x);
}
?
[/snip]
Ooops, typo;
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($i);
}
?
Ahaha,
Jay Blanchard wrote:
[snip]
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($x);
}
?
[/snip]
Ooops, typo;
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($i);
$return($i); ?? You sure about that one?
-Stut
--
[snip]
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($x);
}
?
I'd hazard a guess at I think therefore I am, but looking at it it
seems more like...
If I think then I'm self-aware otherwise I'm a cow, but regardless
of my thinking I'm nothing.
Jay Blanchard wrote:
[snip]
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($i);
$return($i); ?? You sure about that one?
[/snip]
*applause* We have a thinker here ladies and gentlemen! OK Stut, for the
$10,000 bonuswhat should you return here and
[snip]
Well since you've asked... the braces are all wrong, they should be
vertically aligned *ducks and flees*
[/snip]
They were when I sent it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
[snip]
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($i);
$return($i); ?? You sure about that one?
[/snip]
*applause* We have a thinker here ladies and gentlemen! OK Stut, for
the
$10,000 bonuswhat should you return here and what is the
Ryan,
if you want to port the java code to php it wouldnt be very difficult since
this code doesnt rely heavily on much besides core language constructs.
really you could just save it as a php file and start making changes where
needed; it wouldnt take too long to port.
as for the compilation
Jay Blanchard wrote:
[snip]
[snip]
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($i);
$return($i); ?? You sure about that one?
[/snip]
*applause* We have a thinker here ladies and gentlemen! OK Stut, for
the
$10,000 bonuswhat should you return
Jay Blanchard wrote:
[snip]
[snip]
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($i);
$return($i); ?? You sure about that one?
[/snip]
*applause* We have a thinker here ladies and gentlemen! OK Stut, for
the
$10,000 bonuswhat should you return
On Wed, 2007-06-27 at 09:52 -0500, Jay Blanchard wrote:
Ignoring the extra $ and moving on... I would code it like this...
function think($i)
{
$i = 'am';
}
If I call think, then I am thinking, therefore $i should become 'am'.
If you return 'am' rather than changing $i IMHO
Robert Cummings wrote:
On Wed, 2007-06-27 at 09:52 -0500, Jay Blanchard wrote:
Ignoring the extra $ and moving on... I would code it like this...
function think($i)
{
$i = 'am';
}
If I call think, then I am thinking, therefore $i should become 'am'.
If you return 'am' rather than
On Wed, 2007-06-27 at 10:28 -0400, Robert Cummings wrote:
On Wed, 2007-06-27 at 09:25 -0500, Jay Blanchard wrote:
[snip]
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($x);
}
?
[/snip]
Ooops, typo;
?php
function think($i) {
[snip]
?php
function think($i) {
TRUE == $i ? 'self-aware' : 'cow';
$return($i);
$return($i); ?? You sure about that one?
[/snip]
*applause* We have a thinker here ladies and gentlemen! OK Stut, for the
$10,000 bonuswhat should you return here and what is the least
amount
[snip]
Just noticed something else though... what function does $return
contain? :)
[/snip]
A typo. What else did you notice?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, 2007-06-27 at 09:37 -0500, Jay Blanchard wrote:
[snip]
Just noticed something else though... what function does $return
contain? :)
[/snip]
A typo. What else did you notice?
Well since you've asked... the braces are all wrong, they should be
vertically aligned *ducks and flees*
On Wed, 2007-06-27 at 16:01 +0100, Stut wrote:
Robert Cummings wrote:
On Wed, 2007-06-27 at 09:52 -0500, Jay Blanchard wrote:
Ignoring the extra $ and moving on... I would code it like this...
function think($i)
{
$i = 'am';
}
If I call think, then I am thinking, therefore
Hooray! I started a thread that's been able to get beyond 40
posts, and it's not a flame war of wit or a CAPTCHA discussion.
This may be a bit nested and obscure, but it's actually a quote we
see on the list quite often and I get a kick out of it each time I
see it.
?
if(!$trust) {
On 6/27/07, Daniel Brown [EMAIL PROTECTED] wrote:
Hooray! I started a thread that's been able to get beyond 40
posts, and it's not a flame war of wit or a CAPTCHA discussion.
haha, the CAPTCHA discussions were nice :)
This may be a bit nested and obscure, but it's actually a quote we
From the PHP docs:
CURLOPT_FOLLOWLOCATION (integer)
This constant is not available when opendbase_dir or safe_mode
are enabled.
Do you have openbase_dir or safe_mode on?
Cheers,
Rob.
--
Thanks Robert, for your mail. Both these settings are Off in my php.ini file.
Kindly let
How can one find the bit-size of the system on which PHP
is running. php_uname() does not return bit type
Thanks
Shekar
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Shekar Iyer wrote:
How can one find the bit-size of the system on which PHP
is running. php_uname() does not return bit type
A bit is a bit is a bit. It's not a different size on different systems.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
In other words, How do I find if the system on which
PHP is running is 32-bit or 64-bit programmatically?
Shekar Iyer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
How can one find the bit-size of the system on which PHP
is running. php_uname() does not return bit type
Thanks
Stut wrote:
Shekar Iyer wrote:
How can one find the bit-size of the system on which PHP
is running. php_uname() does not return bit type
A bit is a bit is a bit. It's not a different size on different systems.
ho ho ho stut :-)
I think he's looking for the 'word' size of the CPU (32 bit,
Shekar Iyer wrote:
How can one find the bit-size of the system on which PHP
is running. php_uname() does not return bit type
...also this might be of help: getrandmax()
Thanks
Shekar
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 6/27/07, Gowranga [EMAIL PROTECTED] wrote:
From the PHP docs:
CURLOPT_FOLLOWLOCATION (integer)
This constant is not available when opendbase_dir or safe_mode
are enabled.
Do you have openbase_dir or safe_mode on?
Cheers,
Rob.
--
Thanks Robert, for your mail. Both these
Check out Delphi for PHP by Borland, this does pretty much what you're
looking for.
- Dan
Tijnema [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On 6/27/07, Jochem Maas [EMAIL PROTECTED] wrote:
Tijnema wrote:
On 6/27/07, Jochem Maas [EMAIL PROTECTED] wrote:
Tijnema wrote:
Jochem Maas wrote:
Stut wrote:
Shekar Iyer wrote:
How can one find the bit-size of the system on which PHP
is running. php_uname() does not return bit type
A bit is a bit is a bit. It's not a different size on different systems.
ho ho ho stut :-)
I think he's looking for the 'word' size of
On 6/27/07, Dan [EMAIL PROTECTED] wrote:
Check out Delphi for PHP by Borland, this does pretty much what you're
looking for.
- Dan
Uhm, Delphi for PHP costs €259,00, I was looking for something free ;)
Tijnema
Tijnema [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On 6/27/07,
Shekar Iyer wrote:
In other words, How do I find if the system on which
PHP is running is 32-bit or 64-bit programmatically?
echo 'This is a ', is_int(2147483647 + 1) ? 64 : 32 , ' bit box';
HTH
--
View this message in context:
You can better check it through phpinfo(), because it might be changed
through httpd.conf or maybe you're looking at the wrong php.ini...
Just to be sure :)
Tijnema
--
safe_mode entry shows it is put Off and opendbase_dir shows no value in
phpinfo(). Confirmed I have only one php.ini.
Anyone using or know the status of the FreeMovie PHP toolkit?
Seems like development stopped in 2004...
David
Hi all,
Just wanting to pick your collective brains on this one:
How do you go about implementing a swear / bad-word filter in PHP?
Reasons for needing one aside, I'm just wondering if you favour a
regexp, a substr_count, or what? Do you like to *** out the bad words,
or just error back to the
This isn't exactly what was asked for but when I TA'd the principles
of programming languages course, an assignment I gave was to write a
simple poker game in Haskell. If anyone's interested here's the sample
solution I gave:
http://smokinn.tengun.net/comp348/poker.hs
It's all console based of
PHP 5.1.4 on Fedora 2
I recieved a note from a client about a problem with their site today.
Looking at the error log, i found that the DB connection script that's
included into any other that needs it was throwing an error because
MDB2.php couldn't be found:
Failed opening required
Shekar Iyer wrote:
How can one find the bit-size of the system on which PHP
is running. php_uname() does not return bit type
Thanks
Shekar
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
For instance, say you have an AMD 64
brian wrote:
PHP 5.1.4 on Fedora 2
I recieved a note from a client about a problem with their site today.
Looking at the error log, i found that the DB connection script that's
included into any other that needs it was throwing an error because
MDB2.php couldn't be found:
Failed opening
Greg Beaver wrote:
brian wrote:
PHP 5.1.4 on Fedora 2
I recieved a note from a client about a problem with their site today.
Looking at the error log, i found that the DB connection script that's
included into any other that needs it was throwing an error because
MDB2.php couldn't be found:
It does?! I got it for something around $100 if I remember right. I
don't remember you specifying that it had to be free either.
On Jun 27, 2007, at 11:10 AM, Tijnema wrote:
On 6/27/07, Dan [EMAIL PROTECTED] wrote:
Check out Delphi for PHP by Borland, this does pretty much what
you're
73 matches
Mail list logo