Output of the "Removing useless decimal of number_format with PHP" PHP snippet

Environment:

  • Strangebuzz Snippet VM: 6.4.2
  • PHP: 8.3

Code execution output:

array(7) {
  [0]=>
  int(10)
  [1]=>
  float(10)
  [2]=>
  float(10.01)
  [3]=>
  float(10.1)
  [4]=>
  float(10.99)
  [5]=>
  float(10.0101)
  [6]=>
  float(11111.001001)
}

n°0: 10.00 -> 10
n°1: 10.00 -> 10
n°2: 10.01 -> 10,01
n°3: 10.10 -> 10,1
n°4: 10.99 -> 10,99
n°5: 10.01 -> 10,0101
n°6: 11,111.00 -> 11.111,001001

-- With string cast 
n°0: 10
n°1: 10
n°2: 10.01
n°3: 10.1
n°4: 10.99
n°5: 10.0101
n°6: 11111.001001