3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); error_reporting(E_ALL); function blub(string $t) { var_dump($t); var_dump(!strpos($t, 't3://page', 0) === 0); var_dump(!str_starts_with($t, 't3://page')); } blub('t3://page?uid=10'); blub('t3://record?uid=10&identifier=tx_news_domain_model_news');
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.36, 8.3.0 - 8.3.37, 8.4.1 - 8.4.28, 8.5.0 - 8.5.12
string(16) "t3://page?uid=10" bool(false) bool(false) string(55) "t3://record?uid=10&identifier=tx_news_domain_model_news" bool(false) bool(true)
Output for 7.4.0 - 7.4.33
string(16) "t3://page?uid=10" bool(false) Fatal error: Uncaught Error: Call to undefined function str_starts_with() in /in/RR3ue:8 Stack trace: #0 /in/RR3ue(11): blub('t3://page?uid=1...') #1 {main} thrown in /in/RR3ue on line 8
Process exited with code 255.

preferences:
27.38 ms | 1167 KiB | 6 Q