Your tool is broken - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of Your tool is broken.php
- <?php
- $palette_size = 10;
- $brighter_steps = 4;
- $palette = [
- '.50',
- '.100',
- '.200',
- '.300',
- '.400',
- '.500',
- '.600',
- '.700',
- '.800',
- '.900',
- ];
- // Palette should be numbered to 1000
- $step = round( 1000 / $palette_size );
- $numbered_palette = [];
- // We brightened the first brighter step by only half the other steps.
- if ( 0 < $brighter_steps ) {
- $numbered_palette[ $step / 2 ] = array_shift( $palette );
- }
- for ( $i = $step; $i < 1000; $i += $step ) {
- $numbered_palette[ $i ] = array_shift( $palette );
- }
- var_dump( $numbered_palette );
File Description
- Your tool is broken
- PHP Code
- 23 Feb-2021
- 589 Bytes
You can Share it:
Latest PHP Pastes