Write a PHP script to find the longest common prefix of an array of strings.
MediumProblem Statement
Write a PHP script to find the longest common prefix of an array of strings.
Sample Input
['flower', 'flow', 'flight']
Sample Output
fl
Limits
Time: 2s · Memory: 256 MB