Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

What is wrong with PHP?

Name: Anonymous 2007-08-19 22:57 ID:my26XLFz

For web development? You faggots bash PHP all the time. Is it because it's popular it's 'cool' not to like it?

Name: Anonymous 2007-08-19 23:12 ID:Heaven

One word, the brainlessness of the PHP writer, thread over.

Name: Anonymous 2007-08-19 23:17 ID:Heaven

One word, the brainlessness of PHP, thread over.
fixed

Name: Anonymous 2007-08-20 2:36 ID:hbPPrhV1

>>1
Okay, what's good with PHP?

Name: Anonymous 2007-08-20 2:38 ID:p/0M8L19

Thank you for your feedback. This bug is now fixed in CVS.
It was caused by a fix for another bug, trying to prevent such bugs in
the future..unfortunately nobody tested the RCs (release candidates) we
release before actual releases and 5.2.3 went out with this bug
unnoticed..

Name: Anonymous 2007-08-20 3:59 ID:XnWb3d9O

PHP wird von den Juden besessen, und ist von den Zionist Zurücktüren voll.

Name: Anonymous 2007-08-20 4:59 ID:xB93OUZg

PHP originally inserted data received over the network directly into the global namespace, leading to confusion between trusted and untrusted data, and unnecessary potential for security holes in PHP applications. This behavior was turned off by default from version 4.2.0 released in April 2002. However, this feature is still being used by some legacy applications

Name: Anonymous 2007-08-20 5:00 ID:xB93OUZg

PHP has traditionally used features such as "magic_quotes_gpc" and "magic_quotes_runtime" which attempt to escape apostrophes (') and quotes (") in strings in the assumption that they will be used in databases, to prevent SQL injection attacks. This leads to confusion over which data is escaped and which is not, and to problems when data is not in fact used as input to a database.

Name: Anonymous 2007-08-20 5:00 ID:xB93OUZg

PHP does not have complete native support for Unicode or multibyte strings.

Name: Anonymous 2007-08-20 5:00 ID:xB93OUZg

PHP does not enforce the declaration of variables prior to their use, and variables which have not been initialized can have operations (such as concatenation) performed on them; an operation on an uninitialized variable raises an E_NOTICE level error, but this is hidden by default.

Name: Anonymous 2007-08-20 5:00 ID:xB93OUZg

PHP has no namespace support, which leads to a very large amount of globally available functions that can easily number into the thousands.

Name: Anonymous 2007-08-20 5:01 ID:xB93OUZg

PHP's dynamic type conversion could potentially cause problems. Variable types in PHP, although they exist, are transparent to the programmer. Some may consider this a feature, as a variable can change from a number to a string and back again without extra lines of code. However, variable type errors are not detected at compile-time, and the dynamic-typing behavior lacks full predictability.

Name: Anonymous 2007-08-20 5:01 ID:xB93OUZg

The standard function library lacks internal consistency. Many functions perform relatively similar actions and have different name standards and argument orders. For example:

* Argument consistency: strpos($haystack, $needle) vs. in_array($needle, $haystack)
* Naming convention: both of these work case-insensitively strcasecmp() vs. stristr() but the former indicates this with "case" while the later does with "i"
* Function name consistency: strpos() vs. str_replace()

Name: Anonymous 2007-08-20 5:01 ID:xB93OUZg

Functions are not first-class objects. This requires referencing functions by strings and object methods as a two-element array of the object and method name as a string. Consequently, anonymous functions are also referenced by string.

Name: Anonymous 2007-08-20 5:28 ID:dAPrlVjp

>>1
As I see it, the biggest problems are:
- Community full of retarded "designers" that produce shitty code
- Retarded misfeatures fucking faggots still use: register globals, magic quotes and safe mode; all of these lead to insecure software
- Not true first-class functions, lacks closures
- Automagic type conversio is for retarded "designers" and is a pain in the ass, also dangerous and the source for numerous exploits; strong but dynamic typing is the right approach
- One big function namespace
- Some poor-quality standard library functions; mostly their names which are inconsistent and/or ugly
- Stupid error handling (e.g.: calling a function that does not exist, or redefining a function, kills you with fire (hopelessly halts the interpreter), this is stupid stupid stupid stupid)

The rest is fine for its purpose and I like it. (Note I said for its purpose. For general development I'd also say its object model sucks.)

However, I'd rather do PHP than Java, in fact PHP looks awesome compared to Java.

>>9
Almost nothing has proper Unicode support. PHP's is better than average, really. This comes from an Unicode nazi; I approve PHP's support for Unicode if you enable mbstring and use UTF-8, set the function override to 6 or 7, use the u flag in preg_* and always use substr instead of {} to access a string's characters, except if you want to actually get bytes, not characters.

Name: Anonymous 2007-08-20 6:19 ID:Heaven

>>7-14

Same idiot.

Name: Anonymous 2007-08-20 7:21 ID:Heaven

>>16
No shit.

Name: Anonymous 2007-08-20 13:18 ID:je+PZK3M

Alright, so what do you fags use to program dynamic web pages?

Fucking Microshit ASP?  Ruby on Rainbows?  That language that can only be run from cgi-bin?

Fags.  The lot of ya.

Name: Anonymous 2007-08-20 13:41 ID:Pfj2n+Hp

Almost nothing has proper Unicode support.
Are there problems with Python or Perl's?

Name: Anonymous 2007-08-20 13:45 ID:xB93OUZg

>>16
Hurray.

>>18
Don't get me wrong, I like php. It's just flawed. A lot.

Name: Anonymous 2007-08-20 13:59 ID:Heaven


$first_name = split(" ", "dave jones")[0];

ERROR

Name: Anonymous 2007-08-20 14:11 ID:Heaven

>>21
Nice.

Name: Anonymous 2007-08-20 14:30 ID:zL54Ga6f

>>18
C and AJAX!

Name: Anonymous 2007-08-20 14:33 ID:Heaven

>>21
I tried that out, but I can't still believe it.

Name: Anonymous 2007-08-21 0:53 ID:Wp85rVQb

>>21
$first_name = end(array_reverse(split(" ", "dave jones")));

That's the proper solution.

Name: Anonymous 2007-08-21 1:47 ID:eR77uAos

($first_name,$last_name)=split "dave jones";
is the proper solution.

Name: Anonymous 2007-08-21 2:14 ID:Wp85rVQb

>>26
Well, if you're going that way, it's

list($first_name,$last_name) = split(' ','dave jones');

Although, you could omit $first_name, since you can have a blank argument.

Now, there's also the problem of strangely-formatted names, multiple last names, et cetera. Clearly, we mu--

*enables register_globals*

*wins*

Name: Anonymous 2007-08-21 2:26 ID:oeGXuQs+

Do it in C, it's simple

int main() {

    char buffer[] = "jave dones";
    char **p;
    size_t n;
    size_t tokens = 2;
   
    for(n = 0; n < sizeof buffer - 1; n++)
        if(buffer[n] == ' ') tokens++;
   
    p = malloc(tokens * sizeof *p);
    if(p == NULL) {
        perror("malloc");
        return -1;
    }

    if(tokens == 2) {
        p[0] = buffer;
        p[1] = NULL;
    } else {
        *p = strtok(buffer, " ");
        for(n = 1; n < tokens; p[n] = strtok(NULL, " "))
            ;
    }

    return 0;

}

Name: Anonymous 2007-08-21 2:35 ID:oeGXuQs+

>>28
To compile
gcc -Wall -W -std=c99 -pedantic -g3 -O2 -pipe -fomit-frame-pointer -ftree-vectorize

Name: Anonymous 2007-08-21 2:41 ID:Heaven

>>28
actually there was a bug in l26, bugfix:

        for(n = 1; (p[n] = strtok(NULL, " "));)
            ;

Name: Anonymous 2007-08-21 2:41 ID:Heaven

>>30
oh god what the fuck

        for(n = 1; (p[n++] = strtok(NULL, " "));)
            ;

Name: Anonymous 2007-08-21 3:43 ID:xKuAxq/N

>>19
Don't know about Perl's, but Python's, while good, is still not proper:
1. It has a gay "str" type that's not Unicode and everybody uses.
2. It doesn't have proper Unicode console/terminal I/O (on Unix, you have to read/write gay ass strs and convert them to/from UTF-8; on Windows you have to use PyWin32 though I've written a fix for this).
3. Some modules, such as cStringIO, are still working with fag ass strs.

>>21
Another stupid annoying thing of PHP: you cannot array-index an expression, only an actual variable. You can access to object properties that way however (e.g. f()->p), so I wonder why the interpreter is this stupid.

Name: Anonymous 2009-03-06 7:55

The user would choose   C besides of   the standard CPython   but I agree   I agree I   agree I agree   I agree I   agree I agree   that hierarchies are   a pain I!

Name: Anonymous 2009-03-06 10:43


Gay even the NO   text thing that   amounts to anything   else Listens to   ClearChannel radio Am.

Name: Anonymous 2011-02-04 16:02

Don't change these.
Name: Email:
Entire Thread Thread List