<?php
$text0 = "ну что. не смотрел еще black mesa.я собирался скачать ,но все как-то некогда было." ;
$text1 = "roses are red,and violets are blue.whatever you do i'll keep it for you." ;
$text2 = "привет.есть 2 функции,preg_split и explode ,не понимаю,в чем между ними разница." ;
$textArray = array ( $text0 , $text1 , $text2 ) ;
foreach ( $textArray as $currentSentence ) {
$sentenceBreak = preg_split ( '/[.]/' , $currentSentence ) ; foreach ( $sentenceBreak as $singleSentence ) {
toUpperCase( $singleSentence ) ;
}
}
function toUpperCase ( $sentence ) {
}
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7Cm1iX2ludGVybmFsX2VuY29kaW5nKCd1dGYtOCcpOwoKJHRleHQwID0gItC90YMg0YfRgtC+LiAgICAgINC90LUg0YHQvNC+0YLRgNC10Lsg0LXRidC1IGJsYWNrIG1lc2Eu0Y8g0YHQvtCx0LjRgNCw0LvRgdGPINGB0LrQsNGH0LDRgtGMICAs0L3QviDQstGB0LUg0LrQsNC6LdGC0L4g0L3QtdC60L7Qs9C00LAg0LHRi9C70L4uIjsKJHRleHQxID0gInJvc2VzIGFyZSByZWQsYW5kIHZpb2xldHMgYXJlIGJsdWUud2hhdGV2ZXIgeW91IGRvIGknbGwga2VlcCBpdCBmb3IgeW91LiI7CiR0ZXh0MiA9ICLQv9GA0LjQstC10YIu0LXRgdGC0YwgMiDRhNGD0L3QutGG0LjQuCxwcmVnX3NwbGl0INC4IGV4cGxvZGUgLNC90LUg0L/QvtC90LjQvNCw0Y4s0LIg0YfQtdC8INC80LXQttC00YMg0L3QuNC80Lgg0YDQsNC30L3QuNGG0LAuIjsKJHRleHRBcnJheSA9IGFycmF5KCR0ZXh0MCwgJHRleHQxLCAkdGV4dDIpOwoKZm9yZWFjaCAoJHRleHRBcnJheSBhcyAkY3VycmVudFNlbnRlbmNlKSB7Cgkkc2VudGVuY2VCcmVhayA9IHByZWdfc3BsaXQoJy9bLl0vJywgJGN1cnJlbnRTZW50ZW5jZSk7Cglmb3JlYWNoICgkc2VudGVuY2VCcmVhayBhcyAkc2luZ2xlU2VudGVuY2UpIHsKCQl0b1VwcGVyQ2FzZSgkc2luZ2xlU2VudGVuY2UpOwoJfQp9CgpmdW5jdGlvbiB0b1VwcGVyQ2FzZSAoJHNlbnRlbmNlKSB7CgllY2hvKHVjZmlyc3QoJHNlbnRlbmNlKSk7Cn0=