3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Hello, I don't know who I \"am\" but I know who you are, but I don't know where I am"; var_export(array_count_values(str_word_count($string, 1)));
Output for 7.4.0 - 7.4.30, 8.0.1 - 8.0.22, 8.1.0 - 8.1.9
array ( 'Hello' => 1, 'I' => 5, 'don\'t' => 2, 'know' => 3, 'who' => 2, 'am' => 2, 'but' => 2, 'you' => 1, 'are' => 1, 'where' => 1, )

preferences:
20.12 ms | 409 KiB | 5 Q