3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function byRef(&$apples) { $apples++; } $oranges = 5; $apples = 5; byRef($oranges); echo "I have $apples apples and $oranges oranges"; ?>
Output for 4.3.0 - 7.1.0
I have 5 apples and 6 oranges