3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Hello this is dummy.test. in this string any character, any special character can appear. it is not a fixed type text and predefined. this string will not read manually check by the Programmer.Sorry for the bad English."; $test = strrpos($str, 'test'); $dummy = strrpos($str, 'dummy', -strlen($str) - $test); echo $dummy;
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) in /in/JSsaB:9 Stack trace: #0 /in/JSsaB(9): strrpos('Hello this is d...', 'dummy', -243) #1 {main} thrown in /in/JSsaB on line 9
Process exited with code 255.
Output for 5.2.9 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.35, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.2.29 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33
Warning: strrpos(): Offset is greater than the length of haystack string in /in/JSsaB on line 9
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.8
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9
<br /> <b>Warning</b>: Wrong parameter count for strrpos() in <b>/in/JSsaB</b> on line <b>9</b><br />

preferences:
226.64 ms | 402 KiB | 341 Q