3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tmp = "2_【23区・千葉】"; echo strlen( $tmp ) *(-1) + 3 ; $tmp = mb_strimwidth($tmp , strlen( $tmp ) *(-1) + 3 , strlen($tmp ) - 3 ); echo $tmp ;
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.4, 8.3.6 - 8.3.7
-19 Fatal error: Uncaught ValueError: mb_strimwidth(): Argument #2 ($start) is out of range in /in/5gAZd:4 Stack trace: #0 /in/5gAZd(4): mb_strimwidth('2_\xE3\x80\x9023\xE5\x8C\xBA\xE3\x83\xBB\xE5\x8D...', -19, 19) #1 {main} thrown in /in/5gAZd on line 4
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 -19 Fatal error: Uncaught ValueError: mb_strimwidth(): Argument #2 ($start) is out of range in /in/5gAZd:4 Stack trace: #0 /in/5gAZd(4): mb_strimwidth('2_\xE3\x80\x9023\xE5\x8C\xBA\xE3\x83\xBB\xE5\x8D...', -19, 19) #1 {main} thrown in /in/5gAZd on line 4
Process exited with code 255.
Output for 7.0.0 - 7.0.25, 7.1.0 - 7.1.20, 7.2.5 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
-19 Warning: mb_strimwidth(): Start position is out of range in /in/5gAZd on line 4

preferences:
166.46 ms | 403 KiB | 183 Q