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 ( @iconv( 'UTF-8', 'UTF-16BE', "\xc0\x80" ) !== false ) { echo( "JsonFallback: iconv PHP extension failed to reject C0 80\n" ); } if ( @iconv( 'UTF-8', 'UTF-16BE', "\xf4\x90\x80\x80" ) !== false ) { echo( "JsonFallback: iconv PHP extension failed to reject F4 90 80 80\n" ); }
Output for 5.4.0 - 5.5.34, 5.6.0 - 5.6.20, 5.6.28 - 7.0.5, 7.0.14 - 7.1.0
Output for 7.0.6 - 7.0.7
JsonFallback: iconv PHP extension is missing Fatal error: Uncaught Error: Call to undefined function iconv() in /in/0Knk5:7 Stack trace: #0 {main} thrown in /in/0Knk5 on line 7
Process exited with code 255.
Output for 5.5.35 - 5.5.36, 5.6.21 - 5.6.22
JsonFallback: iconv PHP extension is missing Fatal error: Call to undefined function iconv() in /in/0Knk5 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
Output for 4.4.5 - 4.4.9
JsonFallback: iconv PHP extension is missing Fatal error: Call to undefined function: iconv() in /in/0Knk5 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/0Knk5 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/0Knk5 on line 7