3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = fopen(".", "r"); $c[$a] = 1; $c[$a]++; var_dump($c);
based on PMtY8
Output for 4.3.2 - 5.2.2, 5.5.24 - 5.6.28, 7.0.0 - 7.1.0
Warning: fopen(.): failed to open stream: Permission denied in /in/Tph1g on line 2 array(1) { [0]=> int(2) }
Output for hhvm-3.12.0
Warning: Permission denied in /in/Tph1g on line 2 array(1) { [0]=> int(2) }
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.2.3 - 5.4.45
Strict Standards: Resource ID#5 used as offset, casting to integer (5) in /in/Tph1g on line 3 Strict Standards: Resource ID#5 used as offset, casting to integer (5) in /in/Tph1g on line 4 array(1) { [5]=> int(2) }
Output for 4.3.0 - 4.3.1
Warning: fopen(.) [http://www.php.net/function.fopen]: failed to create stream: Permission denied in /in/Tph1g on line 2 array(1) { [0]=> int(2) }