2 ms·
$ php -r "var_dump(preg_match('//', 'foo'));" Command line code:1: int(1)
by hooby 5y ago
$ php -r "var_dump(preg_match('//', 'foo'));"
Command line code:1:
int(1)
- carl_dr 5y agoRandom hint, unrelated to these two posts, but might of of interest to PHPers : Use single quote around the string you pass to PHP to avoid having to quote variable names. php -r ‘$a=“thing”;’ Doesn’t matter in the parent post’s case, but saves either having to worry about escaping or changing all of the quotes if you subsequently expand your single liner for whatever reason, so a good habit to get into. Same with Perl of course.