3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "test1"; $b = strpos($a, "b"); if($b!=FALSE) { $c = substr($a, $b, $b+2); echo $c; } else { echo "not found" } ?>
Output for 5.3.0 - 5.3.20, 5.4.0 - 5.4.10
Parse error: syntax error, unexpected '}', expecting ',' or ';' in /in/VEe6q on line 12
Process exited with code 255.

preferences:
174.9 ms | 1395 KiB | 39 Q