3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var1 = "Cookie Dough"; $var2 = "Vanilla"; $initial = "C"; echo stripos($var1, "C"); echo stripos($var2, "C"); if (stripos($var1,$initial) == 0 && stripos($var2,$initial) == 0) { echo $var1 . " and " . $var2 . " both start with " . $initial . "."; } else { echo "Either " . $var1 . " or " . $var2 . " doesn't start with " . $initial . "; maybe neither of them do."; } ?>
based on 0H8Bu
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
0Cookie Dough and Vanilla both start with C.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: stripos() in /in/eTcll on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: stripos() in /in/eTcll on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: stripos() in /in/eTcll on line 7