Run ❯
Get your
own PHP
server
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <pre> <?php $cars = array("Volvo", "BMW", "Toyota"); foreach ($cars as &$x) { $x = "Ford"; } $x = "ice cream"; var_dump($cars); ?> </pre> </body> </html>
array(3) { [0]=> string(4) "Ford" [1]=> string(4) "Ford" [2]=> &string(9) "ice cream" }