3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var1 = 'ccc'; $var2 = $var1; echo "===========\n"; debug_zval_dump($var1, $var2); $var2 .= 'xxx'; debug_zval_dump($var1, $var2);
based on asLFG
Output for 7.0.0 - 7.1.0
=========== 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
=========== string(3) "ccc" refcount(4) string(3) "ccc" refcount(4) string(3) "ccc" refcount(2) string(6) "cccxxx" refcount(2)