You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d7f1891
Browse filesBrowse the repository at this point in the historyBrowse files
Leave the PCRE functions out of @pure-unless-parameter-passed
preg_match(), preg_match_all(), preg_replace() and preg_filter() raise a
warning on an invalid pattern and set preg_last_error(), so they are not
pure even when their out parameter is omitted. Code relies on that: a bare
preg_match($pattern, '') under set_error_handler() validates a pattern.
preg_replace_callback() goes back to its callback-only entry.
No built-in carries both conditions any more, so a userland function
tagged with both covers the combined verdict.
'Impure call to function str_replace() in pure function PureUnlessParameterPassedBuiltin\pureStrReplaceWithCount().',
499
-
22,
492
+
'Impure call to function PureUnlessParameterPassedFunction\myReplaceCallback() in pure function PureUnlessParameterPassedFunction\pureBothPureCallbackPassingCount().',
493
+
505,
500
494
],
501
495
[
502
-
'Impure call to function preg_match() in pure function PureUnlessParameterPassedBuiltin\purePregMatchWithMatches().',
503
-
40,
496
+
'Impure call to function PureUnlessParameterPassedFunction\myReplaceCallback() in pure function PureUnlessParameterPassedFunction\pureBothImpureCallbackOmittingCount().',
497
+
514,
504
498
],
505
499
[
506
-
'Impure call to function preg_filter() in pure function PureUnlessParameterPassedBuiltin\purePregFilterWithCount().',
507
-
60,
500
+
'Impure echo in pure function PureUnlessParameterPassedFunction\pureBothImpureCallbackOmittingCount().',
501
+
515,
508
502
],
509
503
[
510
-
'Impure call to function preg_replace_callback() in pure function PureUnlessParameterPassedBuiltin\purePregReplaceCallbackWithCount().',
511
-
80,
504
+
'Possibly impure call to a callable in pure function PureUnlessParameterPassedFunction\pureBothOpaqueCallbackOmittingCount().',
505
+
528,
512
506
],
513
507
[
514
-
'Impure call to function preg_replace_callback() in pure function PureUnlessParameterPassedBuiltin\purePregReplaceCallbackImpureCallback().',
515
-
89,
508
+
'Possibly impure call to function PureUnlessParameterPassedFunction\myReplaceCallback() in pure function PureUnlessParameterPassedFunction\pureBothOpaqueCallbackOmittingCount().',
509
+
528,
516
510
],
517
511
[
518
-
'Impure echo in pure function PureUnlessParameterPassedBuiltin\purePregReplaceCallbackImpureCallback().',
519
-
90,
512
+
'Impure call to function PureUnlessParameterPassedFunction\myReplaceCallback() in pure function PureUnlessParameterPassedFunction\pureBothOpaqueCallbackPassingCount().',
513
+
539,
520
514
],
521
515
[
522
-
'Impure call to function str_ireplace() in pure function PureUnlessParameterPassedBuiltin\pureStrIreplaceWithCount().',
523
-
113,
516
+
'Possibly impure call to a callable in pure function PureUnlessParameterPassedFunction\pureBothOpaqueCallbackPassingCount().',
0 commit comments