3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $w="War and 12 Peace3 Ridi Ro"; for($l=$i=mb_strlen($w);$i--;){ $c=array_sum(unpack("C*",mb_substr($w,$i,1))); 96<$c&&$c<123 and $v+=$c-96 or 64<$c&&$c<91 and $v+=1.5*$c-96 or 48<$c&&$c>32||$c>57&&$c<127 and $v-=1; //echo "$v,"; } //echo $v/$l,"\n"; preg_match_all("/\d+/",$w,$m); $v-=array_sum($m[0]); preg_match("/((^| )R.*){2}/", $w)&&$v=-1^1<<127; echo PHP_INT_MAX, "\n"; echo $v;
based on MCTim
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: v in /in/s3CCV on line 6 9223372036854775807 -1
Output for 5.3.18 - 5.6.28
Notice: Undefined variable: v in /in/s3CCV on line 6 9223372036854775807 9223372036854775807