3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Check if a string starts with a substring * * @param string $string * @param string $substr * @return bool */ function str_starts_with(string $string, string $substr): bool { return strpos($string, $substr) === 0; } var_dump( str_starts_with("This is test!", "This"));
Output for git.master, git.master_jit
Fatal error: Cannot redeclare str_starts_with() in /in/sIhrQ on line 9
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Cannot redeclare str_starts_with() in /in/sIhrQ on line 11
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
30.83 ms | 406 KiB | 5 Q