3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // iconv checks if ( !function_exists( 'iconv' ) ) { echo( "JsonFallback: iconv PHP extension is missing\n" ); } if ( iconv( 'UTF-8', 'UTF-16BE', "\x00" ) !== "\x00\x00" ) { echo( "JsonFallback: iconv PHP extension failed to convert U+0000\n" ); } if ( iconv( 'UTF-8', 'UTF-16BE', "\xc4\x80" ) !== "\x01\x00" ) { echo( "JsonFallback: iconv PHP extension failed to convert U+0100\n" ); } if ( iconv( 'UTF-8', 'UTF-16BE', "\xef\xbf\xbf" ) !== "\xff\xff" ) { echo( "JsonFallback: iconv PHP extension failed to convert U+FFFF\n" ); } if ( iconv( 'UTF-8', 'UTF-16BE', "\xf0\x90\x80\x80" ) !== "\xd8\x00\xdc\x00" ) { echo( "JsonFallback: iconv PHP extension failed to convert U+10000\n" ); } if ( (string) @iconv( 'UTF-8', 'UTF-16BE', "A\xc0\x80B" ) !== '' ) { echo( "JsonFallback: iconv PHP extension failed to reject C0 80\n" ); } if ( ($rv = (string) @iconv( 'UTF-8', 'UTF-16BE', "A\xf4\x90\x80\x80B" )) !== '' ) { echo( "JsonFallback: iconv PHP extension failed to reject F4 90 80 80\n" ); var_dump($rv); }
Output for 5.4.0 - 5.5.34, 5.6.8 - 5.6.20, 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.5, 7.0.12 - 7.1.0
Output for 7.0.6
JsonFallback: iconv PHP extension is missing Fatal error: Uncaught Error: Call to undefined function iconv() in /in/KK3a3:7 Stack trace: #0 {main} thrown in /in/KK3a3 on line 7
Process exited with code 255.
Output for 5.5.35, 5.6.21
JsonFallback: iconv PHP extension is missing Fatal error: Call to undefined function iconv() in /in/KK3a3 on line 7
Process exited with code 255.
Output for 5.0.0 - 5.3.29
JsonFallback: iconv PHP extension failed to reject C0 80 JsonFallback: iconv PHP extension failed to reject F4 90 80 80 string(2) "A"
Output for 4.4.5 - 4.4.9
JsonFallback: iconv PHP extension is missing Fatal error: Call to undefined function: iconv() in /in/KK3a3 on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
JsonFallback: iconv PHP extension is missing Fatal error: Call to undefined function: iconv() in /in/KK3a3 on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
JsonFallback: iconv PHP extension is missing Fatal error: Call to undefined function: iconv() in /in/KK3a3 on line 7