Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
kamen69254yP.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...
-
@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.
-
@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. -
@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)
-
@FinlayDaG33k i was about to say "its because your regex is broken and has incomplete brackets" lol, glad you found it.
-
@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? :^) -
@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 -
@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).
Related Rants
Cool, using regex in PHP breaks VSCode's highlighting :^)
rant
vscode
regex
php