Valhalla Legends Archive

Programming => Web Development => Topic started by: Banana fanna fo fanna on August 06, 2004, 11:24 PM

Title: Fusebox with PHP - making it not suck as much
Post by: Banana fanna fo fanna on August 06, 2004, 11:24 PM
http://php-fusebox.sourceforge.net/

Once you get used to it, you'll find that, althoguh PHP still sucks, it's not as bad.
Title: Re:Fusebox with PHP - making it not suck as much
Post by: Banana fanna fo fanna on August 09, 2004, 05:41 PM
http://us4.php.net/manual/en/function.strpos.php

I love how great PHP is!!!!

i have to do if ! (stripos... == false)
Title: Re:Fusebox with PHP - making it not suck as much
Post by: Maddox on August 10, 2004, 03:14 AM
Huh?
Title: Re:Fusebox with PHP - making it not suck as much
Post by: Banana fanna fo fanna on August 10, 2004, 11:28 AM
you can't do
if (strpos(haystack, needle))

you need to do

if (! (strpos(haystack, needle) == false))
Title: Re:Fusebox with PHP - making it not suck as much
Post by: Maddox on August 10, 2004, 11:04 PM
It works for me under PHP 4.3.8 and 5.0.0.
Title: Re:Fusebox with PHP - making it not suck as much
Post by: Banana fanna fo fanna on August 11, 2004, 09:37 PM
Doesn't for me under 4.3
Title: Re:Fusebox with PHP - making it not suck as much
Post by: Maddox on August 11, 2004, 11:48 PM
Try upgrading? 4.3.9RC1 was just released today.
Title: Re:Fusebox with PHP - making it not suck as much
Post by: Banana fanna fo fanna on August 12, 2004, 09:47 AM
Alas, I cannot, for I am stuck with what my clients hosting has.
Title: Re:Fusebox with PHP - making it not suck as much
Post by: Undeference on August 22, 2004, 06:40 PM
Quote from: $t0rm on August 10, 2004, 11:28 AM
you can't do
if (strpos(haystack, needle))

you need to do

if (! (strpos(haystack, needle) == false))
Tryif (strpos (haystack, needle) === false)
This is why they created the === operator.
But you are right about PHP sucking... use instead preg_match. You might have better luck. Or just use Perl (you will never have the stupid problems).
Quote
Title: Re:Fusebox with PHP - making it not suck as much
Post by: Banana fanna fo fanna on August 23, 2004, 10:34 AM
I'd be using Python or CF, except hosting situation has forced PHP upon me.