Rev 1869 Rev 4987
Line 44... Line 44...
44 if ($File===FALSE) 44 if ($File===FALSE)
45 return FALSE; 45 return FALSE;
46   46  
47 // Vyhoď komentáře (po řádcích) 47 // Vyhoď komentáře (po řádcích)
48 foreach($File as $Key => $Line) 48 foreach($File as $Key => $Line)
49 if (substr(ltrim($Line), 0, 2) == '//') 49 if (str_starts_with(ltrim($Line), '//'))
50 unset($File[$Key]); 50 unset($File[$Key]);
51   51  
52 // Sestav z pole jeden retězec 52 // Sestav z pole jeden retězec
53 $File = implode($File); 53 $File = implode('', $File);
54   54  
55 // Vyhledej v souboru informace 55 // Vyhledej v souboru informace
56 $PatternKey = '\[(?P<Key>[a-z,A-Z,0-9,\-\_\.]+)\]'; 56 $PatternKey = '\[(?P<Key>[a-z,A-Z,0-9,\-\_\.]+)\]';
57 $PatternKeyNext = '(?=\[(?:[a-z,A-Z,0-9,\-\_\.]+)\])'; 57 $PatternKeyNext = '(?=\[(?:[a-z,A-Z,0-9,\-\_\.]+)\])';
58 $PatternValue = '(?P<Value>.*?)'; 58 $PatternValue = '(?P<Value>.*?)';