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

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-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;

}

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