3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "Pizza 'PizzaName' this is a certain pizza", "Pizza 'NamePizza' this is a certain pizza", "Pizza 'Hawaii' this is a certain pizza", "Pizza 'Pepperoni' this is a certain pizza", "Pizza is a very nice pizza" ]; foreach ($strings as $string) { print_r(preg_split("~[^']+'[^']+'\K ~", $string)); }

preferences:
26.93 ms | 405 KiB | 5 Q