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);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.160.0030.06319.22
5.4.150.0070.07318.92
5.4.140.0100.06316.46
5.4.130.0100.06716.29
5.4.120.0100.05016.54
5.4.110.0030.04316.39
5.4.100.0070.04016.41
5.4.90.0100.04316.30
5.4.80.0030.03716.34
5.4.70.0200.05716.32
5.4.60.0030.07316.39
5.4.50.0070.04016.36
5.4.40.0070.06016.43
5.4.30.0070.07716.34
5.4.20.0070.04716.27
5.4.10.0100.06716.31
5.4.00.0030.04715.99
5.3.260.0070.08314.54
5.3.250.0100.05714.54
5.3.240.0100.07314.55
5.3.230.0070.04314.50
5.3.220.0070.07314.52
5.3.210.0130.07014.53
5.3.200.0000.04314.50
5.3.190.0130.07014.47
5.3.180.0000.04714.46
5.3.170.0000.05314.50
5.3.160.0100.06014.36
5.3.150.0100.05014.52
5.3.140.0100.05314.35
5.3.130.0070.06714.34
5.3.120.0000.05314.43
5.3.110.0030.04014.48
5.3.100.0100.05713.97
5.3.90.0070.05714.04
5.3.80.0000.05013.84
5.3.70.0000.04013.96
5.3.60.0130.03713.93
5.3.50.0030.05313.77
5.3.40.0030.06013.87
5.3.30.0100.05313.84
5.3.20.0030.04013.62
5.3.10.0070.05313.50
5.3.00.0030.04713.73

preferences:
130.56 ms | 1398 KiB | 7 Q