<?php
echo preg_replace_callback(
'/^.|.\K./',
fn() => rand(0,9),
'1234567'
);
echo "\n---\n";
echo preg_replace_callback(
'/.\K./',
fn() => rand(0,9),
'1234567'
);
- Output for 7.4.11
- 9244568
---
1138537
- Output for 7.4.10
- 5254060
---
1736527
- Output for 7.4.9
- 6254669
---
1434517
- Output for 7.4.8
- 1224064
---
1333557
- Output for 7.4.7
- 3254469
---
1833517
- Output for 7.4.6
- 8224460
---
1938547
- Output for 7.4.5
- 6234661
---
1230517
- Output for 7.4.4
- 9294065
---
1438567
- Output for 7.4.3
- 4284167
---
1132547
- Output for 7.4.2
- 8204060
---
1530547
- Output for 7.4.1
- 7244060
---
1837507
- Output for 7.4.0
- 7214563
---
1033597
- Output for 7.3.0 - 7.3.23
- Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')' in /in/SI7i4 on line 5
Process exited with code 255. - Output for 7.2.0 - 7.2.34
- Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')' in /in/SI7i4 on line 5
Process exited with code 255.
preferences:
84.93 ms | 401 KiB | 76 Q