3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $input_str = trim(fgets(STDIN)); $input_str = str_replace(array("\r\n", "\n", "\r"), "", $input_str); $words = explode(" ", $input_str); $words[0] = 'apple'; $words[1] = 'apple'; echo $words[0] === $words[1];
Output for 5.2.3 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
1
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.2.2
Notice: Use of undefined constant STDIN - assumed 'STDIN' in /in/uqpmi on line 2 Warning: fgets(): supplied argument is not a valid stream resource in /in/uqpmi on line 2 1