3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = "I have a very romantic and tender soul; my heart is full of love and passion, which I desire to share with my soul-mate. I am a very caring and friendly girl. I am also intelligent and a very understanding person with good sense of humor. I have many interests. For example, sports, art, nature, photography´┐Ż"; var_dump( preg_match_all('/([a-zA-Z0-9\,\.\'\"\;\:\-]+){1,}\s{0,}/', $s, $matches), $matches );
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
int(56) array(2) { [0]=> array(56) { [0]=> string(2) "I " [1]=> string(5) "have " [2]=> string(2) "a " [3]=> string(5) "very " [4]=> string(9) "romantic " [5]=> string(4) "and " [6]=> string(7) "tender " [7]=> string(6) "soul; " [8]=> string(3) "my " [9]=> string(6) "heart " [10]=> string(3) "is " [11]=> string(5) "full " [12]=> string(3) "of " [13]=> string(5) "love " [14]=> string(4) "and " [15]=> string(9) "passion, " [16]=> string(6) "which " [17]=> string(2) "I " [18]=> string(7) "desire " [19]=> string(3) "to " [20]=> string(6) "share " [21]=> string(5) "with " [22]=> string(3) "my " [23]=> string(11) "soul-mate. " [24]=> string(2) "I " [25]=> string(3) "am " [26]=> string(2) "a " [27]=> string(5) "very " [28]=> string(7) "caring " [29]=> string(4) "and " [30]=> string(9) "friendly " [31]=> string(7) "girl. " [32]=> string(2) "I " [33]=> string(3) "am " [34]=> string(5) "also " [35]=> string(12) "intelligent " [36]=> string(4) "and " [37]=> string(2) "a " [38]=> string(5) "very " [39]=> string(14) "understanding " [40]=> string(7) "person " [41]=> string(5) "with " [42]=> string(5) "good " [43]=> string(6) "sense " [44]=> string(3) "of " [45]=> string(7) "humor. " [46]=> string(2) "I " [47]=> string(5) "have " [48]=> string(5) "many " [49]=> string(11) "interests. " [50]=> string(4) "For " [51]=> string(9) "example, " [52]=> string(8) "sports, " [53]=> string(5) "art, " [54]=> string(8) "nature, " [55]=> string(11) "photography" } [1]=> array(56) { [0]=> string(1) "I" [1]=> string(4) "have" [2]=> string(1) "a" [3]=> string(4) "very" [4]=> string(8) "romantic" [5]=> string(3) "and" [6]=> string(6) "tender" [7]=> string(5) "soul;" [8]=> string(2) "my" [9]=> string(5) "heart" [10]=> string(2) "is" [11]=> string(4) "full" [12]=> string(2) "of" [13]=> string(4) "love" [14]=> string(3) "and" [15]=> string(8) "passion," [16]=> string(5) "which" [17]=> string(1) "I" [18]=> string(6) "desire" [19]=> string(2) "to" [20]=> string(5) "share" [21]=> string(4) "with" [22]=> string(2) "my" [23]=> string(10) "soul-mate." [24]=> string(1) "I" [25]=> string(2) "am" [26]=> string(1) "a" [27]=> string(4) "very" [28]=> string(6) "caring" [29]=> string(3) "and" [30]=> string(8) "friendly" [31]=> string(5) "girl." [32]=> string(1) "I" [33]=> string(2) "am" [34]=> string(4) "also" [35]=> string(11) "intelligent" [36]=> string(3) "and" [37]=> string(1) "a" [38]=> string(4) "very" [39]=> string(13) "understanding" [40]=> string(6) "person" [41]=> string(4) "with" [42]=> string(4) "good" [43]=> string(5) "sense" [44]=> string(2) "of" [45]=> string(6) "humor." [46]=> string(1) "I" [47]=> string(4) "have" [48]=> string(4) "many" [49]=> string(10) "interests." [50]=> string(3) "For" [51]=> string(8) "example," [52]=> string(7) "sports," [53]=> string(4) "art," [54]=> string(7) "nature," [55]=> string(11) "photography" } }