3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); assert(str_contains('Ahoy World!', 'Ahoy') === true); assert(str_contains('Ahoy World!', 'Hello') === false); assert(str_starts_with('Ahoy World!', 'Ahoy') === true); assert(str_starts_with('AhoyWorld', 'Hello') === false); assert(str_ends_with('Ahoy World!', 'World!') === true); assert(str_ends_with('Ahoy World!', 'Ahoy') === false);

preferences:
25.98 ms | 407 KiB | 5 Q