'); $frag = substr($src, $a, $b - $a); $gpuData = ['clients' => [ '1' => ['pid' => '10', 'name' => 'ffmpeg', 'engine-classes' => ['Render/3D' => ['busy' => '5.0'], 'Video' => ['busy' => '40.0']]], '2' => ['pid' => '11', 'name' => 'mpv', 'engine-classes' => ['Video' => ['busy' => '7.0']]], ]]; ob_start(); eval('?>'.$frag); $html = ob_get_clean(); check('headings list both engines', substr_count($html, '') === 4); preg_match_all('#\s*(\d+)\s*[^<]*(.*?)#s', $html, $rows, PREG_SET_ORDER); check('two client rows', count($rows) === 2); preg_match_all('#([\d.]+)%#', $rows[1][2] ?? '', $m); check('second client has a cell for each heading', count($m[1]) === 2); check('second client Video value sits under Video', ($m[1][1] ?? null) === '7.0'); echo "\n$tests tests, $failures failures\n"; exit($failures ? 1 : 0);