This simplify code, increase readability and improve the function signature for API users.
		
			
				
	
	
		
			58 lines
		
	
	
		
			672 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			672 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
return [
 | 
						|
    [
 | 
						|
        '545',
 | 
						|
        '357',
 | 
						|
    ],
 | 
						|
    [
 | 
						|
        '2515',
 | 
						|
        '1357',
 | 
						|
    ],
 | 
						|
    [
 | 
						|
        '366',
 | 
						|
        '246',
 | 
						|
    ],
 | 
						|
    [
 | 
						|
        '30071',
 | 
						|
        '12345',
 | 
						|
    ],
 | 
						|
    [
 | 
						|
        '726746425',
 | 
						|
        '123456789',
 | 
						|
    ],
 | 
						|
    [
 | 
						|
        '173',
 | 
						|
        '123.45',
 | 
						|
    ],
 | 
						|
    [
 | 
						|
        '072',
 | 
						|
        '58',
 | 
						|
        3,
 | 
						|
    ],
 | 
						|
    [
 | 
						|
        '0',
 | 
						|
        '0',
 | 
						|
    ],
 | 
						|
    // Invalid decimal
 | 
						|
    [
 | 
						|
        '#VALUE!',
 | 
						|
        '3579A',
 | 
						|
    ],
 | 
						|
    // Non string
 | 
						|
    [
 | 
						|
        '#VALUE!',
 | 
						|
        true,
 | 
						|
    ],
 | 
						|
    // 2's Complement
 | 
						|
    [
 | 
						|
        '7777777634',
 | 
						|
        '-100',
 | 
						|
    ],
 | 
						|
    // 2's Complement
 | 
						|
    [
 | 
						|
        '7777777625',
 | 
						|
        '-107',
 | 
						|
    ],
 | 
						|
];
 |