3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array ( 0 => array ( 'one' => 'A {bad} thing.', 'two' => 'So far so {bad}.', ), 1 => array ( 'one' => 'A {bad} thing, bis.', 'two' => 'So far so {bad}, bis.', ), ); $b = preg_replace('/\{bad\}/', 'good', $a); echo '$b = '; var_export($b); echo ';', "\n";

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
158.02 ms | 3354 KiB | 12 Q