Create a PHP script to count the frequency of each word in a string.
MediumProblem Statement
Create a PHP script to count the frequency of each word in a string.
Sample Input
"hello world hello"
Sample Output
{"hello":2,"world":1}Limits
Time: 2s · Memory: 256 MB