3v4l.org

run code in 300+ PHP versions simultaneously
<?php str_contains("", null); // > No errors function _str_contains ( string $haystack , string $needle ) : bool { return true; } _str_contains("", null);
Output for 8.0.0 - 8.0.3
Fatal error: Uncaught TypeError: _str_contains(): Argument #2 ($needle) must be of type string, null given, called in /in/OVoa0A on line 11 and defined in /in/OVoa0A:6 Stack trace: #0 /in/OVoa0A(11): _str_contains('', NULL) #1 {main} thrown in /in/OVoa0A on line 6
Process exited with code 255.
Output for 7.3.0 - 7.3.27, 7.4.0 - 7.4.16
Fatal error: Uncaught Error: Call to undefined function str_contains() in /in/OVoa0A:3 Stack trace: #0 {main} thrown in /in/OVoa0A on line 3
Process exited with code 255.