line 2 and 3 First check if the number starts with either 234 or +234 using regex stored inside pattern
block 4 If it contains (+)234, check if there is + and replace it with empty string, then replace 234 with 0
If the number did not contain (+)234, the if block in line 4 is skipped to line 8
Number now must have been stripped of 234 or +234 and replaced with 0
But what if the number did not contain 234 or +234 or even 0 e.g 9036051122
So
line 8 Check for the 0 is not present at all, then add 0
line 9 return desired value e.g 09033221100