3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $charset=str_repeat("abcdefghijklmnopqrstuvwxyz",2); $msg="tm bcsv qolfp f'dmvd xuhm exl tgak hlrkiv sydg hxm qiswzzwf qrf oqdueqe dpae resd wndo liva bu vgtokx sjzk hmb rqch fqwbg fmmft seront sntsdr pmsecq"; $format=explode(" ",$msg); for($element=0;$element<=count($format);$element++){ $string=$format[$element]; $len=strlen($string); $key=$element+1; print $string." ".$len." ".$key."\n"; for($char=0;$char<=$len-1;$char++){ $l=strpos($charset,substr($string,$char,1)); print substr($string,$char,1)."\n"; $n=substr($charset,$l+$key,1); print $n."\n"; } }
Output for 5.6.0 - 5.6.38, 7.0.0 - 7.3.0rc5
tm 2 1 t u m n bcsv 4 2 b d c e s u v x qolfp 5 3 q t o r l o f i p s f'dmvd 6 4 f j ' e d h m q v z d h xuhm 4 5 x c u z h m m r exl 3 6 e k x d l r tgak 4 7 t a g n a h k r hlrkiv 6 8 h p l t r z k s i q v d sydg 4 9 s b y h d m g p hxm 3 10 h r x h m w qiswzzwf 8 11 q b i t s d w h z k z k w h f q qrf 3 12 q c r d f r oqdueqe 7 13 o b q d d q u h e r q d e r dpae 4 14 d r p d a o e s resd 4 15 r g e t s h d s wndo 4 16 w m n d d t o e liva 4 17 l c i z v m a r bu 2 18 b t u m vgtokx 6 19 v o g z t m o h k d x q sjzk 4 20 s m j d z t k e hmb 3 21 h c m h b w rqch 4 22 r n q m c y h d fqwbg 5 23 f c q n w t b y g d fmmft 5 24 f d m k m k f d t r seront 6 25 s r e d r q o n n m t s sntsdr 6 26 s s n n t t s s d d r r pmsecq 6 27 p q m n s t e f c d q r Notice: Undefined offset: 27 in /in/31dgd on line 6 0 28
Output for hhvm-3.22.0
tm 2 1 t u m n bcsv 4 2 b d c e s u v x qolfp 5 3 q t o r l o f i p s f'dmvd 6 4 f j ' e d h m q v z d h xuhm 4 5 x c u z h m m r exl 3 6 e k x d l r tgak 4 7 t a g n a h k r hlrkiv 6 8 h p l t r z k s i q v d sydg 4 9 s b y h d m g p hxm 3 10 h r x h m w qiswzzwf 8 11 q b i t s d w h z k z k w h f q qrf 3 12 q c r d f r oqdueqe 7 13 o b q d d q u h e r q d e r dpae 4 14 d r p d a o e s resd 4 15 r g e t s h d s wndo 4 16 w m n d d t o e liva 4 17 l c i z v m a r bu 2 18 b t u m vgtokx 6 19 v o g z t m o h k d x q sjzk 4 20 s m j d z t k e hmb 3 21 h c m h b w rqch 4 22 r n q m c y h d fqwbg 5 23 f c q n w t b y g d fmmft 5 24 f d m k m k f d t r seront 6 25 s r e d r q o n n m t s sntsdr 6 26 s s n n t t s s d d r r pmsecq 6 27 p q m n s t e f c d q r Notice: Undefined index: 27 in /in/31dgd on line -1 0 28
Output for hhvm-3.12.14 - 3.21.3
tm 2 1 t u m n bcsv 4 2 b d c e s u v x qolfp 5 3 q t o r l o f i p s f'dmvd 6 4 f j ' e d h m q v z d h xuhm 4 5 x c u z h m m r exl 3 6 e k x d l r tgak 4 7 t a g n a h k r hlrkiv 6 8 h p l t r z k s i q v d sydg 4 9 s b y h d m g p hxm 3 10 h r x h m w qiswzzwf 8 11 q b i t s d w h z k z k w h f q qrf 3 12 q c r d f r oqdueqe 7 13 o b q d d q u h e r q d e r dpae 4 14 d r p d a o e s resd 4 15 r g e t s h d s wndo 4 16 w m n d d t o e liva 4 17 l c i z v m a r bu 2 18 b t u m vgtokx 6 19 v o g z t m o h k d x q sjzk 4 20 s m j d z t k e hmb 3 21 h c m h b w rqch 4 22 r n q m c y h d fqwbg 5 23 f c q n w t b y g d fmmft 5 24 f d m k m k f d t r seront 6 25 s r e d r q o n n m t s sntsdr 6 26 s s n n t t s s d d r r pmsecq 6 27 p q m n s t e f c d q r Notice: Undefined index: 27 in /in/31dgd on line 6 0 28