3v4l.org

run code in 300+ PHP versions simultaneously
<?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,1)); print substr($string,$char+1,1);#$n=substr($charset,$l+$key,1); print $n."\n"; }
Output for 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0 - 8.5.1
tm 2 1 bcsv 4 2 qolfp 5 3 f'dmvd 6 4 xuhm 4 5 exl 3 6 tgak 4 7 hlrkiv 6 8 sydg 4 9 hxm 3 10 qiswzzwf 8 11 qrf 3 12 oqdueqe 7 13 dpae 4 14 resd 4 15 wndo 4 16 liva 4 17 bu 2 18 vgtokx 6 19 sjzk 4 20 hmb 3 21 rqch 4 22 fqwbg 5 23 fmmft 5 24 seront 6 25 sntsdr 6 26 pmsecq 6 27 Warning: Undefined array key 27 in /in/iQj2q on line 6 Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /in/iQj2q on line 7 0 28 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /in/iQj2q on line 10
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 8.0.0 - 8.0.30
tm 2 1 bcsv 4 2 qolfp 5 3 f'dmvd 6 4 xuhm 4 5 exl 3 6 tgak 4 7 hlrkiv 6 8 sydg 4 9 hxm 3 10 qiswzzwf 8 11 qrf 3 12 oqdueqe 7 13 dpae 4 14 resd 4 15 wndo 4 16 liva 4 17 bu 2 18 vgtokx 6 19 sjzk 4 20 hmb 3 21 rqch 4 22 fqwbg 5 23 fmmft 5 24 seront 6 25 sntsdr 6 26 pmsecq 6 27 Warning: Undefined array key 27 in /in/iQj2q on line 6 0 28
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
tm 2 1 Warning: strpos(): Empty needle in /in/iQj2q on line 10 bcsv 4 2 Warning: strpos(): Empty needle in /in/iQj2q on line 10 qolfp 5 3 Warning: strpos(): Empty needle in /in/iQj2q on line 10 f'dmvd 6 4 Warning: strpos(): Empty needle in /in/iQj2q on line 10 xuhm 4 5 Warning: strpos(): Empty needle in /in/iQj2q on line 10 exl 3 6 Warning: strpos(): Empty needle in /in/iQj2q on line 10 tgak 4 7 Warning: strpos(): Empty needle in /in/iQj2q on line 10 hlrkiv 6 8 Warning: strpos(): Empty needle in /in/iQj2q on line 10 sydg 4 9 Warning: strpos(): Empty needle in /in/iQj2q on line 10 hxm 3 10 Warning: strpos(): Empty needle in /in/iQj2q on line 10 qiswzzwf 8 11 Warning: strpos(): Empty needle in /in/iQj2q on line 10 qrf 3 12 Warning: strpos(): Empty needle in /in/iQj2q on line 10 oqdueqe 7 13 Warning: strpos(): Empty needle in /in/iQj2q on line 10 dpae 4 14 Warning: strpos(): Empty needle in /in/iQj2q on line 10 resd 4 15 Warning: strpos(): Empty needle in /in/iQj2q on line 10 wndo 4 16 Warning: strpos(): Empty needle in /in/iQj2q on line 10 liva 4 17 Warning: strpos(): Empty needle in /in/iQj2q on line 10 bu 2 18 Warning: strpos(): Empty needle in /in/iQj2q on line 10 vgtokx 6 19 Warning: strpos(): Empty needle in /in/iQj2q on line 10 sjzk 4 20 Warning: strpos(): Empty needle in /in/iQj2q on line 10 hmb 3 21 Warning: strpos(): Empty needle in /in/iQj2q on line 10 rqch 4 22 Warning: strpos(): Empty needle in /in/iQj2q on line 10 fqwbg 5 23 Warning: strpos(): Empty needle in /in/iQj2q on line 10 fmmft 5 24 Warning: strpos(): Empty needle in /in/iQj2q on line 10 seront 6 25 Warning: strpos(): Empty needle in /in/iQj2q on line 10 sntsdr 6 26 Warning: strpos(): Empty needle in /in/iQj2q on line 10 pmsecq 6 27 Warning: strpos(): Empty needle in /in/iQj2q on line 10 Notice: Undefined offset: 27 in /in/iQj2q on line 6 0 28
Output for 5.6.0 - 5.6.40
tm 2 1 bcsv 4 2 qolfp 5 3 f'dmvd 6 4 xuhm 4 5 exl 3 6 tgak 4 7 hlrkiv 6 8 sydg 4 9 hxm 3 10 qiswzzwf 8 11 qrf 3 12 oqdueqe 7 13 dpae 4 14 resd 4 15 wndo 4 16 liva 4 17 bu 2 18 vgtokx 6 19 sjzk 4 20 hmb 3 21 rqch 4 22 fqwbg 5 23 fmmft 5 24 seront 6 25 sntsdr 6 26 pmsecq 6 27 Notice: Undefined offset: 27 in /in/iQj2q on line 6 0 28

preferences:
178.34 ms | 414 KiB | 5 Q