@ 2020-11-25T01:05:14Z <?php
$params = [
'subject' => 'Hello 7', // normally third parameter
'pattern' => '/[a-z ]/', // normally first parameter
// 'limit' // normally fourth parameter, omitted for this demonstration; the default -1 will be used
'count' => &$counted, // normally fifth parameter
// ^-- don't forget to make it modifiable!
'replacement' => '', // normally second parameter
];
echo preg_replace(...$params) . "\n" . $counted;
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.0.0 - 8.0.30 , 8.1.0 - 8.1.31 , 8.2.0 - 8.2.26 , 8.3.0 - 8.3.14 , 8.4.1 H7
5 Output for 7.2.0 - 7.2.34 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 Fatal error: Uncaught Error: Cannot unpack array with string keys in /in/0F2Cg:11
Stack trace:
#0 {main}
thrown in /in/0F2Cg on line 11
Process exited with code 255 . preferences:dark mode live preview
67.46 ms | 407 KiB | 5 Q