2

I created a regex which works locally but not on a remote installation with the same php version.

I am confused… very confused

Comments
  • 0
    Different OSes?

    Different configuration?
  • 1
    Check your cache.
  • 0
    @IntrusionCM different OSes, same configuration, same content
  • 0
    @vintprox checked already, used incognito as well. Shit’s witchcraft, I tell you!
  • 2
    @piratefox you might be in for a wild ride.
  • 0
    Windows vs Linux? Newlines?

    What other variations could you think of?
  • 0
    @asgs this can go all up the stack.

    Different locale behaviour, newline behaviour, charset configuration.

    RegEx is a fragile thing when it comes to OS specific behaviour
  • 2
    Your first mistake was thinking php behaves the same on different environments.

    Your second mistake was regex. 😅
  • 0
    use some Regex Library that handles all platforms
  • 0
    use a proper programming language
  • 0
    @asgs Linux Linux
  • 1
    @C0D4 agreed on php, disagreed on regex, it is pretty awesome for certain things!

    @kiki I wish I could… php hurts my soul, especially the way my colleague writes it :/
  • 1
    Check the most obvious first, which is incorrect regex + unexpectedly different input.
  • 0
    @Maer validated on regexer, static input… I ended up giving up and splitting and joining the text where I needed :s

    Oh sorry, I mean “ExPlOdInG and ImPlOdInG”

    … stupid php
  • 1
    @piratefox Too bad, we shall never know what went down there. But hey, at least it's working now.
  • 0
    @BixelPitch told my manager since I’ve been here! Buuut we “dont have time for it”
  • 0
    @BixelPitch tried to, they kept saying devs should have a working local environment and that that is our priority.

    … to which I replied that… docker machine = an environment which can be run locally

    But the more I tried to explain them that docker IS the fucking environment they want, the more they opposed. :/

    Would just do it on my side, but we need passwords and bs to pull the custom library (cause ofc we have custom libraries… which basically don’t do anything but hey, using phar and fucking the whole project is nice) we use and security doesn’t trust the devs so we’re stuck having half-working crap.

    “You guys should really read the unicorn project”

    “Don’t have time for that”

    “It shows.”
Add Comment