3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $h='my home is my castle'; $n='is'; $part = stristr($h,$n,true); $part2 = stristr($h,$n); if (version_compare(PHP_VERSION, '5.0.0', '>=')) { if($pos=stripos($h,$n)) $part3=substr($h,0,$pos); }else echo 'I am using PHP 4, my version: ' . PHP_VERSION . "\n"; } $h=strtolower($h); $n=strtolower($n); if($pos=strpos($h,$n)) $part4=substr($h,0,$pos); echo "This is my: $part\n"; echo "That is my: $part2\n"; echo "Also, this: $part3\n"; echo "This too: $part4\n"; ?>
Output for 5.3.0 - 5.4.4
Parse error: syntax error, unexpected '}' in /in/Gb0E7 on line 10
Process exited with code 255.