<?php
$typeHandlers = [
's',
'd','u', 'c', 'o', 'x', 'X', 'b',
'g', 'G', 'e', 'E', 'f', 'F', '+d',
];
$testNum = 22.12314123124;
foreach($typeHandlers as $type){
printf("Type $type : %".$type."\n", $testNum);
}
$testArr = [
+1231241.12312312312,
-1231241241.22231,
0.00000000000000000000001,
'stringy',
];
foreach($typeHandlers as $t){
printf("Type $t : %".$t." \n %".$t." \n %".$t." \n %".$t." \n",
$testArr[0],$testArr[1], $testArr[2], $testArr[3]);
}
preferences:
67.66 ms | 404 KiB | 5 Q