10

Cool, using regex in PHP breaks VSCode's highlighting :^)

Comments
  • 4
    Solution: don't use PHP :D
  • 5
    Solution: don’t use regex :D
  • 13
    Solution: close that open group with a square bracket instead of a curly one :D
  • 5
    @JS96 Solution: Don't code at all.
  • 0
    P.S. Does PHP have a way to pass a regular expression directly (enclosed in forward slashes, but not in quotes) like JS does? Maybe if the syntax highlighter assumes something like this and doesn't cater to all cases...
  • 1
    @kamen nope it doesn't and nope it doesn't. It just sees that open character group and wants it to be closed or the opening bracket to be escaped.
  • 10
    Durr, I'm stupid, I added a "}" instead of "]" :^)
  • 2
    It's a trick to make you stop using PHP
  • 1
    Solution: use PHPStorm
  • 4
    @100110111 Nah, I'd rather have 1 place to do it all that works across platforms (preferably if free).

    @ScriptCoded I shall never abandon my bae.
  • 1
    @FinlayDaG33k Fight me 😡🤬
  • 2
    @FinlayDaG33k I understand that, but personally I’d rather use tools that make developing painless rather than something like VS Code which.... well, erm, doesn’t rly work that great with all langs (PHP being one of them)
  • 0
    Single quotes for regEx. '...'

    And that Loop thing below looks fishy....
  • 0
    @FinlayDaG33k i was about to say "its because your regex is broken and has incomplete brackets" lol, glad you found it.
  • 1
    PHP lets you suck.

    VSCode showed you suck.
  • 1
    @100110111 VSCode works fine with PHP if you don't make fuckups like I did...

    Been using VSCode with PHP for years now and this is actually the first issue (albeit PEBCAK).

    @IntrucionCM I always use single quotes for regex.

    Also, that loop thing isn't anything fishy at all? (it's part of AmPHP)

    @arcsector yea, I executed the code and it told me I had an unexpected "}" in my code which pointed me to it :p

    Hoozay for stacktraces!

    @HiFiWiFiSciFi Would you mind not reflecting your sexual life onto me? :^)
  • 1
    @FinlayDaG33k Please consider those gender neutral zie/zim "sucks".
  • 1
    @FinlayDaG33k but you used double quotes here ;)

    $this->config['store']['write']($resp['batch'])

    Come on.... An associative array containing an object that executes a function with an associative array as a parameter...

    That is fishy.

    Leaving the array ception aside, a function with strict typing could provide documentation on wth these arrays contain
  • 0
    @IntrusionCM Oh, I thought you meant the `Loop::run` part itself :p

    Yea, I still need to clean up the function in an array part... I'm porting a Deno library to PHP so that's why :p

    Will clean it up _someday_ :p

    Regex is probably also copied over hence the double quotes...

    The regex part is gone anyways (PHP has a nice strip_tags function that does the same).
  • 0
    Laravel?
  • 2
    @DevRage Laravel can go die in a fire :)
  • 1
    Solution: notepad++
Add Comment