Skip to main content
Commonmark migration
Source Link

#PHP4.1, 63 62 bytes

PHP4.1, 63 62 bytes

Not the best golfing, but surely is quite short.

<?for($S=kMG;$B>1e3;$I++)$B/=1e3;printf("%.1f{$S[$I-1]}B",$B);

To use it, access over POST/GET or set a value in the SESSION, on the key B.

Leave the key I unset!

#PHP4.1, 63 62 bytes

Not the best golfing, but surely is quite short.

<?for($S=kMG;$B>1e3;$I++)$B/=1e3;printf("%.1f{$S[$I-1]}B",$B);

To use it, access over POST/GET or set a value in the SESSION, on the key B.

Leave the key I unset!

PHP4.1, 63 62 bytes

Not the best golfing, but surely is quite short.

<?for($S=kMG;$B>1e3;$I++)$B/=1e3;printf("%.1f{$S[$I-1]}B",$B);

To use it, access over POST/GET or set a value in the SESSION, on the key B.

Leave the key I unset!

Reduced 1 byte
Source Link
Ismael Miguel
  • 7.9k
  • 2
  • 25
  • 38

#PHP4.1, 6363 62 bytes

Not the best golfing, but surely is quite short.

<?for($S=' kMG';$B>1e3;$I++$S=kMG;$B>1e3;$I++)$B/=1e3;printf("%.1f{$S[$I]$S[$I-1]}B",$B);

To use it, access over POST/GET or set a value in the SESSION, on the key B.

Leave the key I unset!

#PHP4.1, 63 bytes

Not the best golfing, but surely is quite short.

<?for($S=' kMG';$B>1e3;$I++)$B/=1e3;printf("%.1f{$S[$I]}B",$B);

To use it, access over POST/GET or set a value in the SESSION, on the key B.

Leave the key I unset!

#PHP4.1, 63 62 bytes

Not the best golfing, but surely is quite short.

<?for($S=kMG;$B>1e3;$I++)$B/=1e3;printf("%.1f{$S[$I-1]}B",$B);

To use it, access over POST/GET or set a value in the SESSION, on the key B.

Leave the key I unset!

Source Link
Ismael Miguel
  • 7.9k
  • 2
  • 25
  • 38

#PHP4.1, 63 bytes

Not the best golfing, but surely is quite short.

<?for($S=' kMG';$B>1e3;$I++)$B/=1e3;printf("%.1f{$S[$I]}B",$B);

To use it, access over POST/GET or set a value in the SESSION, on the key B.

Leave the key I unset!