3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 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'; for($i=0;$i<strlen($x);$i++) print $a[$i].' '.$x[$i]."\n"; print $a[$i][(((int)$x[$i+1])-1)];
based on gNYiW
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
AABBCC 1 14CDF1 3 CDCCC0 2 5E9CF5 4 FFAFEE 3 30FC40 4 DF00FF 1 007EFC 6 FA9F01 2 00FFC0 5 4FD01F 3 C0F22F 1 4A9CE1 2 166FEC 6 4F991D 6 C0F22C 6 FAACC1 2 A9AC99 4 DFD01F 3 C0FC3A 1 A99F01 1 0AC4C0 3 2DA01F 2 CC652F 1 FA9881 2 00CFC0 5 4FD41F 3 CC92CF 5 Notice: Uninitialized string offset: 29 in /in/mqEuo on line 7 Notice: Undefined offset: 28 in /in/mqEuo on line 7
Output for hhvm-3.10.0 - 3.12.0
AABBCC 1 14CDF1 3 CDCCC0 2 5E9CF5 4 FFAFEE 3 30FC40 4 DF00FF 1 007EFC 6 FA9F01 2 00FFC0 5 4FD01F 3 C0F22F 1 4A9CE1 2 166FEC 6 4F991D 6 C0F22C 6 FAACC1 2 A9AC99 4 DFD01F 3 C0FC3A 1 A99F01 1 0AC4C0 3 2DA01F 2 CC652F 1 FA9881 2 00CFC0 5 4FD41F 3 CC92CF 5 Notice: Undefined index: 28 in /in/mqEuo on line 7
Output for 5.2.10 - 5.2.17
AABBCC 1 14CDF1 3 CDCCC0 2 5E9CF5 4 FFAFEE 3 30FC40 4 DF00FF 1 007EFC 6 FA9F01 2 00FFC0 5 4FD01F 3 C0F22F 1 4A9CE1 2 166FEC 6 4F991D 6 C0F22C 6 FAACC1 2 A9AC99 4 DFD01F 3 C0FC3A 1 A99F01 1 0AC4C0 3 2DA01F 2 CC652F 1 FA9881 2 00CFC0 5 4FD41F 3 CC92CF 5 Notice: Uninitialized string offset: 29 in /in/mqEuo on line 7 Notice: Undefined offset: 28 in /in/mqEuo on line 7
Output for 4.3.0 - 5.2.9
AABBCC 1 14CDF1 3 CDCCC0 2 5E9CF5 4 FFAFEE 3 30FC40 4 DF00FF 1 007EFC 6 FA9F01 2 00FFC0 5 4FD01F 3 C0F22F 1 4A9CE1 2 166FEC 6 4F991D 6 C0F22C 6 FAACC1 2 A9AC99 4 DFD01F 3 C0FC3A 1 A99F01 1 0AC4C0 3 2DA01F 2 CC652F 1 FA9881 2 00CFC0 5 4FD41F 3 CC92CF 5 Notice: Uninitialized string offset: 29 in /in/mqEuo on line 7 Notice: Undefined offset: 28 in /in/mqEuo on line 7