3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function fdopen($id, $mode) { return fopen("/proc/self/fd/".(int)$id, $mode); } $stdin = fopen('php://stdin', 'r'); echo $stdin; for ($i = 1; $i <= 10; $i++) { echo $i; } echo STDIN;
based on 8SkIR
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0rc3
Resource id #512345678910Resource id #1
Output for hhvm-3.15.4
Resource id #412345678910Resource id #1