File tree Expand file tree Collapse file tree 1 file changed +17
-13
lines changed Expand file tree Collapse file tree 1 file changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -332,30 +332,34 @@ This behavior is best illustrated with examples::
332
332
$crawler->addHtmlContent($html);
333
333
334
334
$crawler->filterXPath('//span[contains(@id, "article-")]')->evaluate('substring-after(@id, "-")');
335
- /* array:3 [
336
- 0 => "100"
337
- 1 => "101"
338
- 2 => "102"
339
- ]
335
+ /* Result:
336
+ [
337
+ 0 => '100',
338
+ 1 => '101',
339
+ 2 => '102',
340
+ ];
340
341
*/
341
342
342
343
$crawler->evaluate('substring-after(//span[contains(@id, "article-")]/@id, "-")');
343
- /* array:1 [
344
- 0 => "100"
344
+ /* Result:
345
+ [
346
+ 0 => '100',
345
347
]
346
348
*/
347
349
348
350
$crawler->filterXPath('//span[@class="article"]')->evaluate('count(@id)');
349
- /* array:3 [
350
- 0 => 1.0
351
- 1 => 1.0
352
- 2 => 1.0
351
+ /* Result:
352
+ [
353
+ 0 => 1.0,
354
+ 1 => 1.0,
355
+ 2 => 1.0,
353
356
]
354
357
*/
355
358
356
359
$crawler->evaluate('count(//span[@class="article"])');
357
- /* array:1 [
358
- 0 => 3.0
360
+ /* Result:
361
+ [
362
+ 0 => 3.0,
359
363
]
360
364
*/
361
365
You can’t perform that action at this time.
0 commit comments