Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Eugene Irwin
    @YoungSimba85
    Also eating Doritos
    Lily Romano
    @Lilyheart
    mmmm Doritos :)
    G7470
    @G7470
    Doritos are really good!
    Eugene Irwin
    @YoungSimba85
    Who is this community is familiar with PHP?
    G7470
    @G7470
    I am familiar
    What are you having issues with?
    Eugene Irwin
    @YoungSimba85
    splitting strings using strtok( ), Im sorry to say that I don't understand its relevance in place of using explode( )
    What purpose would you use strtok over explode?
    G7470
    @G7470
    It really depends on what you're using it for. If you only have one delimiter and a fairly small-sized string, explode() could probably be used over strtok(). Basically, strtok() is more memory-conscious, but explode() is more...shall I say, consistent? on the return value. Sometimes strtok() can return values that PHP can interpret differently than intended if the string is "complex" and you are trying to break it up into tiny pieces
    While I wouldn't suggest they could be used interchangeably from a professional perspective, on a practical standpoint (along with the fact that being memory-conscious isn't as important as it was several years ago), they could be used interchangeably for the same purpose
    Eugene Irwin
    @YoungSimba85
    @G7470 Would you say explode() would be more optimal for breaking down email addresses to determine the proper address to send them to?
    Seems like strtok would be suited for a censorship application, i.e pulling offensive language from strings.
    G7470
    @G7470
    Yeah, I would say that explode() would be more optimal for that purpose
    Eugene Irwin
    @YoungSimba85
    In case anyone was interested the Celtics are starting to drag the Miami heat. Celtics by 15 tonight!
    Eugene Irwin
    @YoungSimba85
    No sports fans?
    G7470
    @G7470
    Sorry, been working on a project. I've been following basketball some. Looks like they're in OT right now
    Eugene Irwin
    @YoungSimba85
    Yeah, the Heat just came back and won.........sports
    G7470
    @G7470
    Dang. It has been a good playoff so far though
    G7470
    @G7470
    Hey all! What is everyone working on tonight?
    Evander
    @evantides
    Hi!
    I have homework right now that i need to work on. I'm attending a class at General Assembly
    G7470
    @G7470
    Oh nice! That sounds really neat. How is that class going?
    Lily Romano
    @Lilyheart
    I have homework right now that I need to work on... but ugh.
    G7470
    @G7470
    I know that feeling, lol
    G7470
    @G7470
    Hey all! What's everyone working on tonight? Be safe out there with the storms!
    G7470
    @G7470
    Hey all! Happy Tuesday! How is everyone doing?