3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<pre><?php $var1 = 'ccc'; $var2 = $var1; echo "separate variables\n"; debug_zval_dump($var1, $var2); $var2 .= 'xxx'; debug_zval_dump($var1, $var2);
based on lR3Wp
Output for 7.0.0 - 7.1.0
<pre>separate variables string(3) "ccc" refcount(1) string(3) "ccc" refcount(1) string(3) "ccc" refcount(1) string(6) "cccxxx" refcount(2)
Output for 4.3.0 - 5.6.28
<pre>separate variables string(3) "ccc" refcount(4) string(3) "ccc" refcount(4) string(3) "ccc" refcount(2) string(6) "cccxxx" refcount(2)