<?php ?>
Wiem, że __CLASS__ zwraca nazwę bieżącej klasy ale nie rozumiem co daje:
<?php ?>
Może mi ktoś to wytłumaczyć?
<?php ?>
<?php ?>
<?php class ConfigCreator { public $sClassName = 'Config'; const RegEx = '@%([^%]+)%@'; public function __construct( $sClassName = 'Config' ) { $this->sClassName = $sClassName; } public function Generate( $sPath = null, $sSavePath = null ) { $sSource = $this->getHeader(); foreach( $aConfig As $sKey => $aLine ) { foreach( $aLine As $sName => $sValue ) { $sSource .= $this->getLine( $sKey.$sName, $sValue ); } } $sSource .= $this->getFooter(); file_put_contents( $sSavePath, $sSource ); } } protected function getLine( $sName, $sValue ) { $sValue .= ''; } return ' static public $'.$sName.' = ''.$sValue.'';'; } } ?>
<?php function show($matches) { return $matches[0]; } $lanuch = 'sad*.txtaaa'; $wzor = '@*.txt@'; ?>
<?php function show($matches) { return $matches[0]; } $lanuch = 'sad*.txtaaa'; $wzor = '@*.txt@'; ?>
<?php function show($matches) { } $lanuch = 'sad*.txtaaa'; $wzor = '@*.txt@'; ?>
<?php return $matches[1]; //otrzymuję ciąg bez części szukanej return $matches[0].'|'.$matches[1].'|'.$matches[2]; // tu już orzymuję dziwne rzeczy ?>
lub arraye
<?php $str = "jakis@ciag.znakow"; ?>
<?php $arr[0] = "/@/"; $arr[1] = "/./"; $arrr[0] = "@"; $arrr[1] = "."; $str = "jakis@ciag.znakow"; ?>