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
Copy file name to clipboardExpand all lines: README.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,9 +62,11 @@ $searcher
62
62
->searchCode('<?php $oneA = "1a";');
63
63
```
64
64
65
+
When searching using any of the available methods, regular expressions can be used by surrounding the name with slashes `/`, i.e. `/test\d+/`.
66
+
65
67
### Variable names
66
68
67
-
To search for variables by name, use the `variables` method. To use regular expressions, surround the values with `/`.
69
+
To search for variables by name, use the `variables` method.
68
70
69
71
```php
70
72
$results = $searcher
@@ -83,7 +85,7 @@ foreach($results->results as $result) {
83
85
84
86
### Functions
85
87
86
-
To search for function calls or definitions, use the `functions` method. Regular expressions can be used by surrounding the name with slashes `/`, i.e. `/test\d+/`.
88
+
To search for function calls or definitions, use the `functions` method.
87
89
88
90
```php
89
91
// search for references AND definitions for 'strtolower' and/or 'myfunc'
@@ -94,7 +96,7 @@ $searcher
94
96
95
97
### Method calls
96
98
97
-
To search for a method call by name, use the `methods` method before calling `search`. Surround the search terms with slashes to use regular expressions.
99
+
To search for a method call by name, use the `methods` method.
98
100
99
101
Method call nodes have an `args` property that can be looped through to retrieve the arguments for the method call.
100
102
@@ -118,7 +120,7 @@ foreach($results->results as $result) {
118
120
119
121
### Static calls
120
122
121
-
To search for static method or property calls, use the `static` method before calling `search`.
123
+
To search for static method or property calls, use the `static` method.
122
124
123
125
Valid search terms are either a class name like `Cache`, or a class name and a method name like `Cache::remember`.
124
126
@@ -130,7 +132,7 @@ $searcher
130
132
131
133
### Classes
132
134
133
-
To search for either a class definition or a class created by the `new` keyword, use the `classes`. Regular expression patterns are supported by surrounding a value with slashes `/`.
135
+
To search for either a class definition or a class created by the `new` keyword, use the `classes` method.
134
136
135
137
```php
136
138
$searcher
@@ -140,7 +142,7 @@ $searcher
140
142
141
143
### Variable assignments
142
144
143
-
To search for a variable assignment by variable name, use the `assignments` method before calling `search`. _Note: The `$` should be omitted._
145
+
To search for a variable assignment by variable name, use the `assignments` method. _Note: The `$` should be omitted._
0 commit comments