3v4l.org

run code in 300+ PHP versions simultaneously
<?php $keywords = ['a', 'b']; $temp = str_repeat('?, ', count($keywords) - 1) . '?'; echo $temp . "\n"; $keywords = ['a', 'b', 'c', 'd', 'e']; $temp = str_repeat('?, ', count($keywords) - 1) . '?'; echo $temp . "\n";
Output for 8.1.32, 8.2.25 - 8.2.29, 8.3.5 - 8.3.25, 8.4.1 - 8.4.12
?, ? ?, ?, ?, ?, ?

preferences:
47.65 ms | 406 KiB | 5 Q