3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'iPhone 7 plus - space grey (New)', 'iPhone6 plus, brand new, (Used)', 'iPhone 5 ( black)', ]; var_export(preg_replace('~ ?[^ [:alnum:]].*~', '', $strings));
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
array ( 0 => 'iPhone 7 plus', 1 => 'iPhone6 plus', 2 => 'iPhone 5', )

preferences:
95.66 ms | 402 KiB | 62 Q