3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array("007EFC", "00CFC0", "00FFC0", "0AC4C0", "14CDF1", "166FEC", "2DA01F", "30FC40", "4A9CE1", "4F991D", "4FD01F", "4FD41F", "5E9CF5", "A99F01", "A9AC99", "AABBCC", "C0F22C", "C0F22F", "C0FC3A", "CC652F", "CC92CF", "CDCCC0", "DF00FF", "DFD01F", "FA9881", "FA9F01", "FAACC1", "FFAFEE"); $b = array("AABBCC", "14CDF1", "CDCCC0", "5E9CF5", "FFAFEE", "30FC40", "DF00FF", "007EFC", "FA9F01", "00FFC0", "4FD01F", "C0F22F", "4A9CE1", "166FEC", "4F991D", "C0F22C", "FAACC1", "A9AC99", "DFD01F", "C0FC3A", "A99F01", "0AC4C0", "2DA01F", "CC652F", "FA9881", "00CFC0", "4FD41F", "CC92CF"); $x = '1324341625312666243113212535'; $l = strlen($x); for($i=0;$i<$l;$i++) { $key = $x[$i] * $i; $a_color = $a[$key % $l]; $b_color = $b[$key % $l]; echo $b_color."\n"; }
based on NTAoS
Output for 5.3.19 - 7.2.0
AABBCC 5E9CF5 FFAFEE 4A9CE1 4A9CE1 A99F01 DF00FF 4F991D FAACC1 A9AC99 CDCCC0 C0F22F FA9881 2DA01F AABBCC DF00FF FFAFEE 4A9CE1 4FD41F C0FC3A A99F01 007EFC FAACC1 CC652F A99F01 166FEC 2DA01F CC652F