3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //echo $string = 'Automóvel'; //echo utf8_encode($string); $products = array('horloges', 'media', 'gereedschap'); echo'<pre>';print_r($products); // convert to a string $string = json_encode($products); echo $string; // ["horloges","media","gereedschap"]
Output for 5.2.0 - 7.1.0
<pre>Array ( [0] => horloges [1] => media [2] => gereedschap ) ["horloges","media","gereedschap"]
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.1.6
<pre>Array ( [0] => horloges [1] => media [2] => gereedschap ) Fatal error: Call to undefined function json_encode() in /in/MvgUQ on line 11
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/MvgUQ on line 12
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<pre>Array ( [0] => horloges [1] => media [2] => gereedschap ) Fatal error: Call to undefined function: json_encode() in /in/MvgUQ on line 11
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<pre>Array ( [0] => horloges [1] => media [2] => gereedschap ) Fatal error: Call to undefined function: json_encode() in /in/MvgUQ on line 11
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<pre>Array ( [0] => horloges [1] => media [2] => gereedschap ) Fatal error: Call to undefined function: json_encode() in /in/MvgUQ on line 11