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.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
string(133) " function test(a) { for(let n=0; n < a.length; n++){ console.log(a[n]); } }; test(['one', 'two']); content "

preferences:
67.73 ms | 406 KiB | 5 Q