+1.
That reminds me of a feature I miss in sscanf. Present good behaviour:
array_sscanf("1234567890123","%10d%d");
(1) Result: ({ /* 2 elements */ 1234567890, 123 })
array_sscanf("1234567890123","%3d%d");
(2) Result: ({ /* 2 elements */ 123, 4567890123 })
Present bad behaviour:
array_sscanf("1234567890123","%-3d%d");
(3) Result: ({ /* 2 elements */ 123, 4567890123 })
Wanted behaviour:
array_sscanf("1234567890123","%-3d%d");
(4) Result: ({ /* 2 elements */ 1234567890, 123 })
array_sscanf("1234567890123","%-4d%2d%d");
(5) Result: ({ /* 3 elements */ 123456789, 1, 23 })