3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'goofe eas تان ک'.chr( bindec( '11111100' ) ).'ے عسکری ذرائع کے مطابق بدھ' .chr( bindec( '11011111' ) ); echo mb_substr( $string , 6 , null , 'utf-8' )."\n"; echo mb_substr( $string , 6 , 4 , 'utf-8' )."\n"; echo mb_substr( $string , 6 , -4 )."\n"; echo mb_substr( $string , -4 , null , 'utf-8' )."\n"; echo "After setting internal encoding\n'; mb_internal_encoding( 'utf-8' ); echo mb_substr( $string , 6 )."\n"; echo mb_substr( $string , 6 , 4 )."\n"; echo mb_substr( $string , 6 , -4 )."\n"; echo mb_substr( $string , -4 )."\n"; exit(0);
Output for 5.4.0 - 5.4.16
Parse error: syntax error, unexpected '\' (T_NS_SEPARATOR), expecting ',' or ';' in /in/Wqmb0 on line 17
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected T_NS_SEPARATOR, expecting ',' or ';' in /in/Wqmb0 on line 17
Process exited with code 255.

preferences:
169.81 ms | 1395 KiB | 51 Q