- var_dump: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$re = '/Fatal error:/';
$str = '
Fatal error: Call to a member function routeRequest() on a non-object in /apps/newalexeygoncharenko/lib/components/shared/lib/NetworkPathService.php on line 59
sddf
';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);