3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html=<<<HTML <!DOCTYPE html> <html lang="en"> <head> <script> function test(a) { for(let n=0; n < a.length; n++){ console.log(a[n]); } }; test(['one', 'two']); </script> </head> <body> <p>content</p> </body> </html> HTML; var_dump(strip_tags($html));
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
string(133) " function test(a) { for(let n=0; n < a.length; n++){ console.log(a[n]); } }; test(['one', 'two']); content "

preferences:
86.94 ms | 402 KiB | 61 Q