3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function &f() { $str = 'vasya'; var_dump($str); return ($a); } for ($i = 0; $i < 10; $i++) { $r = f(); }
Output for 5.1.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(5) "vasya" string(5) "vasya" string(5) "vasya" string(5) "vasya" string(5) "vasya" string(5) "vasya" string(5) "vasya" string(5) "vasya" string(5) "vasya" string(5) "vasya"
Output for 5.0.4 - 5.0.5
string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6
Output for 5.0.0 - 5.0.3
string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Strict Standards: Only variable references should be returned by reference in /in/MKmp5 on line 6
Output for 4.4.0 - 4.4.9
string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Notice: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Notice: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Notice: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Notice: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Notice: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Notice: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Notice: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Notice: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Notice: Only variable references should be returned by reference in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 Notice: Only variable references should be returned by reference in /in/MKmp5 on line 6
Output for 4.3.0 - 4.3.11
string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 string(5) "vasya" Notice: Undefined variable: a in /in/MKmp5 on line 6 NULL Notice: Undefined variable: a in /in/MKmp5 on line 6 NULL Notice: Undefined variable: a in /in/MKmp5 on line 6 NULL Notice: Undefined variable: a in /in/MKmp5 on line 6 NULL Notice: Undefined variable: a in /in/MKmp5 on line 6 NULL Notice: Undefined variable: a in /in/MKmp5 on line 6 NULL Notice: Undefined variable: a in /in/MKmp5 on line 6 NULL Notice: Undefined variable: a in /in/MKmp5 on line 6 NULL Notice: Undefined variable: a in /in/MKmp5 on line 6