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 @@ -346,30 +346,34 @@ This behavior is best illustrated with examples::
346
346
$crawler->addHtmlContent($html);
347
347
348
348
$crawler->filterXPath('//span[contains(@id, "article-")]')->evaluate('substring-after(@id, "-")');
349
- /* array:3 [
350
- 0 => "100"
351
- 1 => "101"
352
- 2 => "102"
353
- ]
349
+ /* Result:
350
+ [
351
+ 0 => '100',
352
+ 1 => '101',
353
+ 2 => '102',
354
+ ];
354
355
*/
355
356
356
357
$crawler->evaluate('substring-after(//span[contains(@id, "article-")]/@id, "-")');
357
- /* array:1 [
358
- 0 => "100"
358
+ /* Result:
359
+ [
360
+ 0 => '100',
359
361
]
360
362
*/
361
363
362
364
$crawler->filterXPath('//span[@class="article"]')->evaluate('count(@id)');
363
- /* array:3 [
364
- 0 => 1.0
365
- 1 => 1.0
366
- 2 => 1.0
365
+ /* Result:
366
+ [
367
+ 0 => 1.0,
368
+ 1 => 1.0,
369
+ 2 => 1.0,
367
370
]
368
371
*/
369
372
370
373
$crawler->evaluate('count(//span[@class="article"])');
371
- /* array:1 [
372
- 0 => 3.0
374
+ /* Result:
375
+ [
376
+ 0 => 3.0,
373
377
]
374
378
*/
375
379
You can’t perform that action at this time.
0 commit comments