Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions word-count.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<?php

//
// This is only a SKELETON file for the "Hello World" exercise.
// It's been provided as a convenience to get you started writing code faster.
//

function wordCount($phrase)
{
//
// YOUR CODE GOES HERE
//
function wordCount($phrase= "") {
$phrase= "The str_word_count() function counts the number of words in a string.";
return str_word_count(explode('', $phrase));
}

?>